SF Bug Tracker: http lib only accepts HTTP/1.1 - ID:3485745
Submitted by Berend Dekens ( Berend Dekens ) - 2012-02-08 06:24:31 PST
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?
-------------------------------------------------------------------
Comment by Fabrice Fontaine:
Hide
Hi,
You're right, this modification should be removed. This version checking
was wrongly added in parser_parse_responseline function.
...
(cherry picked from commit d87c966ec5
)
This commit is contained in:
parent
3bb8f59a1b
commit
cf0f53bb63
@ -255,6 +255,11 @@ Version 1.8.0
|
||||
Version 1.6.16
|
||||
*******************************************************************************
|
||||
|
||||
2012-02-23 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
|
||||
|
||||
Revert cb89781a55466703763c1b0ee67094eb401ddfe9 as suggested by
|
||||
Fabrice Fontaine.
|
||||
|
||||
2012-02-07 Edwin Stearns <edwin(at)vtilt.com>
|
||||
|
||||
Attached is a patch that resolved an issue I found with a server that
|
||||
|
@ -1378,10 +1378,9 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
|
||||
&hmsg->major_version, &hmsg->minor_version,
|
||||
&hmsg->status_code);
|
||||
line.buf[line.length] = save_char; /* restore */
|
||||
if (num_scanned != 3 || hmsg->major_version < 0 ||
|
||||
/* HTTP version equals to 1.0 should fail as required by the
|
||||
* UPnP certification tool */
|
||||
hmsg->minor_version < 1 || hmsg->status_code < 0)
|
||||
if (num_scanned != 3 ||
|
||||
hmsg->major_version < 0 || hmsg->minor_version < 0 ||
|
||||
hmsg->status_code < 0)
|
||||
/* bad response line */
|
||||
return PARSE_FAILURE;
|
||||
/* point to status msg */
|
||||
|
Loading…
Reference in New Issue
Block a user