#66 http lib only accepts HTTP/1.1

None
closed-accepted
upnp (66)
5
2013-07-31
2012-02-08
Anonymous
No

In httpparser.c on line 1385 it says that HTTP 1.0 replies are blocked because the UPnP verfication tool requires this.

I looked in the specs and as far as I can find, one should only be carefull to send chunked communication to hosts supporting HTTP 1.1. There is no requirement to support only HTTP 1.1.

The XBMC media server uses the Platinum UPnP library which replies using HTTP/1.0 messages. As it is now, libupnp returns an error while trying to parse the response while the response itself is completely valid.

Is there a requirement in the UPnP 1.0 spec that I missed or is this restriction self-imposed? And can it be lifted?

Discussion

  • Hi,

    You're right, this modification should be removed. This version checking was wrongly added in parser_parse_responseline function.

    For your information, this version checking has been added in parser_parse_requestline (http://pupnp.git.sourceforge.net/git/gitweb.cgi?p=pupnp/pupnp;a=commit;h=6c6fb3707f809b7bf7373b2fbe496913255f6227) as the requirement from the UPnP 1.0 spec is that UPnP devices should not answer to M-SEARCH using HTTP version 1.0.

    Best Regards,

    Fabrice

     
  • Would any of you test and prepare a patch? Or is it ok to just remove the commit that Fabrice mentioned? I would like to release next week with this modification.

    Regards,
    Marcelo.

     
  • Hi Marcelo,

    You can revert the patch cb89781a55466703763c1b0ee67094eb401ddfe9 which is incorrect. The patch is mentionned in my previous comment is the correct one and should be kept.

    Best Regards,

    Fabrice

     
    • assigned_to: nobody --> mroberto
    • status: open --> pending-accepted
     
  • I have manually reverted it, please check and acknowledge that everything is ok.

    Regards,
    Marcelo.

     
    • status: pending-accepted --> closed-accepted