#23 QueryStateVar bug

closed-accepted
None
5
2010-03-14
2009-01-29
Anonymous
No

There is something going wrong in soap_ctrlpt.c at line 931 (based on version 1.6.6 release).

The http_Makemessage call looks as follows:

if (http_MakeMessage(
&request, 1, 1,
"Q" "sbc" "N" "s" "s" "Ucc" "sss",
SOAPMETHOD_POST, path.buf, path.length,
"HOST: ", host.buf, host.length,
content_length,
ContentTypeHeader,
"SOAPACTION: \"urn:schemas-upnp-org:control-1-0#QueryStateVariable\"",
xml_start, var_name, xml_end ) != 0 ) {
return UPNP_E_OUTOF_MEMORY;
}

This will result in the SOAPACTION header to be immediately followed by the User-Agent header, while a cr-lf should separate the two. I propose to fix this by changing the second "s" to "sc" to force the addition of a cr-lf after the SOAPACTION. This looks consistent to the other Makemessage calls. Patch include.

Cheers,

Hugo

Discussion

  • Nick Leverton
    Nick Leverton
    2010-03-03

    This issue still exists in both 1.6.x and 1.8.0.

     
    • assigned_to: nobody --> mroberto
    • status: open --> closed-accepted
     
  • You are right, the CR/LF has been missed in a long ago change.
    Committed in both branches.