bug: incorrect decode of query part
- From: Gustavo Sverzut Barbieri <gustavo barbieri indt org br>
- To: libsoup-list gnome org
- Subject: bug: incorrect decode of query part
- Date: Thu, 17 Aug 2006 11:26:31 -0300
Hello,
When libsoup creates a new message it does call soup_uri_new_with_base(),
which will find the query delimiter ('?') and then make this the uri->query
member.
However when it does that it calls soup_uri_decode() on the entire query,
which produces wrong results. It should, instead, split query on internal '&'
demiliter and then convert both key and value.
How to check that: create a simple HTML GET-form that contains an text type
input and type something like: "a=b&c=d". You should get "a%3Db%26c%3Dd" in
your path in simple-httpd.c, but instead you get "a=b&c=d", which will mess
scripts that will receive 3 pairs instead of 1.
some alternatives on how to solve that:
a) do not mess with query
b) convert query to a hash table of lists of strings, keys and list values
both should be decoded.
I already have the code for b), so I'm ok with you providing just a) :-)
Thanks!
--
Gustavo Sverzut Barbieri
------------------------
INdT, Recife, Brazil
Jabber: barbieri gmail com
MSN: barbieri gmail com
ICQ#: 17249123
Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
GPG: 0xb640e1a2 @ wwwkeys.pgp.net
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]