View Issue Details

IDProjectCategoryView StatusLast Update
0002531libmicrohttpdHTTP GET/HEADpublic2012-09-01 18:53
Reporterxzhao Assigned ToChristian Grothoff Due Date
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 18: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 19: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 08:15

reporter   ~0006314

We tested the patch and it fixed the problem.

Thanks for the fast response!

Christian Grothoff

2012-09-01 18:53

manager   ~0006317

Released in 0.9.22.

Issue History

Date ModifiedUsernameFieldChange
2012-08-30 12:35xzhaoNew Issue
2012-08-30 18:54Christian GrothoffAssigned To => Christian Grothoff
2012-08-30 18:54Christian GrothoffStatusnew => assigned
2012-08-30 18:59Christian GrothoffNote Added: 0006312
2012-08-30 19:00Christian GrothoffPrioritynormal => immediate
2012-08-30 19:00Christian GrothoffTarget Version => 0.9.22
2012-08-30 19:17Christian GrothoffNote Added: 0006313
2012-08-31 00:00Christian GrothoffStatusassigned => feedback
2012-08-31 08:15xzhaoNote Added: 0006314
2012-08-31 08:15xzhaoStatusfeedback => assigned
2012-08-31 10:19Christian GrothoffStatusassigned => resolved
2012-08-31 10:19Christian GrothoffFixed in Version => 0.9.22
2012-08-31 10:19Christian GrothoffResolutionopen => fixed
2012-09-01 18:53Christian GrothoffNote Added: 0006317
2012-09-01 18:53Christian GrothoffStatusresolved => closed
2013-05-06 10:54Christian GrothoffCategoryHTTP GET => HTTP GET/HEAD