Re: XMLHttpRequest not populating Query variable (yui connection manager)
Sovande Ulv <[email protected]> Tue, 13 Jan 2009 09:37:36 +0100
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Message-ID | <[email protected]> |
On 13. jan.. 2009, at 06.47, culleyharrelson wrote:
> The yui connection manager is stubbornly changing CONTENT_TYPE to:
>
> application/x-www-form-urlencoded; charset=UTF-8
>
Its not YUI, but Firefox 3.x as it says here http://developer.yahoo.com/yui/connection/
under Known Issues:
In Firefox 3.0, all HTTP POST transactions automatically receive a
Content-Type header of application/x-www-form-urlencoded;
charset=UTF-8. This condition was not imposed in prior versions of
Firefox, but it appears 3.0 is quite strict in this regard.
Connection Manager users who send POST data with language-specific
charsets will be impacted by this change in Firefox 3.0.
> line 643 of cgi.c has:
>
> if (type && !strcmp(type, "application/x-www-form-urlencoded"))
>
> If the charset=UTF-8 is a valid addition, line 643 might need to be
> changed.
>
So changing the above to something like this can be useful
if (type && !strncmp(type, "application/x-www-form-urlencoded",
sizeof("application/x-www-form-urlencoded") - 1))