Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256843 - net-libs/libupnp-1.6.6: StateVar query not working
Summary: net-libs/libupnp-1.6.6: StateVar query not working
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Bjarke Istrup Pedersen (RETIRED)
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-29 20:39 UTC by Hugo Trippaers
Modified: 2009-02-01 09:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Trippaers 2009-01-29 20:39:16 UTC
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.

diff -ru libupnp-1.6.6/upnp/src/soap/soap_ctrlpt.c libupnp-1.6.6-patched/upnp/src/soap/soap_ctrlpt.c
--- libupnp-1.6.6/upnp/src/soap/soap_ctrlpt.c   2008-02-10 02:55:33.000000000 +0100
+++ libupnp-1.6.6-patched/upnp/src/soap/soap_ctrlpt.c   2009-01-29 21:09:41.000000000 +0100
@@ -931,7 +931,7 @@
     content_length = strlen( xml_start ) + strlen( var_name ) + strlen( xml_end );
     if (http_MakeMessage(
        &request, 1, 1,
-       "Q" "sbc" "N" "s" "s" "Ucc" "sss",
+       "Q" "sbc" "N" "s" "sc" "Ucc" "sss",
        SOAPMETHOD_POST, path.buf, path.length,
        "HOST: ", host.buf, host.length,
        content_length,



Reproducible: Always

Steps to Reproduce:
1. Perform a state var query 
2.
3.

Actual Results:  
Server responds with 401 invalid action.

Expected Results:  
SOAP OK message with value of queries variable

Also submitted to the project itself as patch 2546532 (http://sourceforge.net/tracker/index.php?func=detail&aid=2546532&group_id=166957&atid=841028)
Comment 1 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2009-01-31 17:05:03 UTC
Fixed in 1.6.6-r1 , should hit the tree within 1-2 hours :)
Comment 2 Hugo Trippaers 2009-02-01 09:49:26 UTC
(In reply to comment #1)
> Fixed in 1.6.6-r1 , should hit the tree within 1-2 hours :)
> 

Thanks :D