[Gambas-user] My first Gambas patch (HttpClient content-type validation)
Benoît Minisini
gambas at ...1...
Thu Jun 23 00:25:02 CEST 2011
> I noticed that the validation on the content-type param (first param on
> a call to HttpClient.Post) seemed a little too strict.
>
> It wouldn't allow me to (for example) specify:
>
> http.Post("application/soap+xml; charset=utf-8", data)
>
> So I have patched line 247 of CHttpClient.c in trunk/gb.net.curl/src
> from:
>
> if (isalnum(c) || c == '-' || c == '+' || c == '.' || c == '/')
>
> to now read:
>
> if (isalnum(c) || c == '-' || c == '+' || c == '.' || c == '/' || c ==
> ';' || c == ' ' || c == '=')
>
> Thus adding semi-colon, space, and the equals sign to the set of
> accepted characters.
>
> I have tested this locally and it appears to work but I don't have
> commit rights to the Gambas3 svn (probably a good thing lol).
>
> Could one of the maintainers take a look and, if in agreement, make the
> above patch in trunk?
>
> Thanks and regards,
> Caveat
>
Thanks. Merged in revision #3897.
Regards,
--
Benoît Minisini
More information about the User
mailing list