Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem when action request doesn't have Content-Length header
01-07-2013, 04:04 PM
Post: #3
RE: Problem when action request doesn't have Content-Length header
(30-06-2013 09:05 PM)simonc Wrote:  
(30-06-2013 08:34 PM)simoncn Wrote:  If a control point sends an HTTP POST action request without a Content-Length header, ohNet rejects it with a 400 Bad Request response.

I'm attaching a patch to DviServerUpnp.cpp and DviServerUpnp.h to fix this.

Thanks for providing a fix as well as such a comprehensive report - its very much appreciated. I'll try to get this integrated tomorrow.

It might take me slightly longer to get this integrated. To aid native embedded clients with tight memory budgets, device stack code is often stricter than control point code about use of dynamic allocation. This means that patterns which are suitable for control point development aren't always appropriate on device side.

I'd like to find a way to implement this functionality without the dynamic per-action allocation. Its not immediately obvious how to do this so it might take me a couple of days to work through.
Find all posts by this user


Messages In This Thread
RE: Problem when action request doesn't have Content-Length header - simonc - 01-07-2013 04:04 PM

Forum Jump: