Re: POST bug

Raphaël HUCK <[email protected]> Wed, 4 Nov 2009 10:00:08 +0100
Newsgroups gmane.text.clearsilver.general
Message-ID <[email protected]>
Le Tue, 3 Nov 2009 16:18:03 -0800,
Mark Fletcher <[email protected]> a écrit :

> Not sure when this started happening, but at least with Dojo these
> days, forms are POSTed with a Content-Type that include a charset
> declaration, ie:
> 
> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
> 
> The clearsilver CGI wrapper doesn't catch this because it's doing a
> full string compare. Change line 643 of cgi/cgi.c to this to fix:
> 
> if (type && !strncmp(type, "application/x-www-form-urlencoded", 33))

Hi Mark,

I have submitted some patches 11 months ago to OpenWrt:
https://dev.openwrt.org/ticket/4265 and then found out that someone had
already posted it on the CS mailing-list:
http://tech.groups.yahoo.com/group/ClearSilver/message/1182?l=1

The "; charset=UTF-8" has been introduced in Firefox 3 more than a year
and half ago, and since then all the applications that were only
expecting "application/x-www-form-urlencoded" started experiencing
weird problems.

FF2, IE6, IE7,... don't send the charset part so that specific
problem only occurs in FF3.

Have a nice day,

-Raphael
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkrxQpgACgkQZZJCqtjWvyke9ACggfKPKKBGAOAJ1o8wJ61/ZVRL
ksgAoIcPBULQdAuQKUrYNYCEZrzukPct
=ckZh
-----END PGP SIGNATURE-----