View Issue Details

IDProjectCategoryView StatusLast Update
0002531libmicrohttpdHTTP GET/HEADpublic2012-09-01 20:53
Reporterxzhao Assigned ToChristian Grothoff  
PriorityimmediateSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformx86OSLinuxOS Version2.6.32
Product Version0.9.21 
Target Version0.9.22Fixed in Version0.9.22 
Summary0002531: Incorrect query string parsing
DescriptionThe library seems to incorrectly parse the query string part of a URL if the equal sign is ommited. In the documentation it states the value will be NULL if the URL contains a key without and equals operator, but if that key is not the last key, the library fails to regonize the key at all.

If we compile the src/testcurl/daemontest_urlparse.c example the query string is:
a=b&c=&d
and the output is:
key(a) value(b)
key(c) value()
key(d) value((null))

If we change the query string to:
d&c=&a=b
We would expect the same output in the reverse order but we get:
key(d&c) value()
key(a) value(b)
Error (code: 16)

I am not sure what the correct behaviour is according to the RFC but the documentation at least suggests that the current behaviour is incorrect.

TagsNo tags attached.

Activities

Christian Grothoff

2012-08-30 20:59

manager   ~0006312

We should fix this, the behavior is clearly inconsistent, which is not acceptable. Should not take long, please expect a patch this weekend...

Christian Grothoff

2012-08-30 21:17

manager   ~0006313

Issue should be fixed in SVN 23524. Please let me know if this patch fixes it (I did not yet do extensive testing).

xzhao

2012-08-31 10:15

reporter   ~0006314

We tested the patch and it fixed the problem.

Thanks for the fast response!

Christian Grothoff

2012-09-01 20:53

manager   ~0006317

Released in 0.9.22.

Issue History

Date Modified Username Field Change
2012-08-30 14:35 xzhao New Issue
2012-08-30 20:54 Christian Grothoff Assigned To => Christian Grothoff
2012-08-30 20:54 Christian Grothoff Status new => assigned
2012-08-30 20:59 Christian Grothoff Note Added: 0006312
2012-08-30 21:00 Christian Grothoff Priority normal => immediate
2012-08-30 21:00 Christian Grothoff Target Version => 0.9.22
2012-08-30 21:17 Christian Grothoff Note Added: 0006313
2012-08-31 02:00 Christian Grothoff Status assigned => feedback
2012-08-31 10:15 xzhao Note Added: 0006314
2012-08-31 10:15 xzhao Status feedback => assigned
2012-08-31 12:19 Christian Grothoff Status assigned => resolved
2012-08-31 12:19 Christian Grothoff Fixed in Version => 0.9.22
2012-08-31 12:19 Christian Grothoff Resolution open => fixed
2012-09-01 20:53 Christian Grothoff Note Added: 0006317
2012-09-01 20:53 Christian Grothoff Status resolved => closed
2013-05-06 12:54 Christian Grothoff Category HTTP GET => HTTP GET/HEAD