httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: No function for x-www-form-urlencoded?
Date Wed, 17 Jul 2002 14:05:46 GMT
Rodent of Unusual Size <Ken.Coar@Golux.Com> writes:

> Something just came up on the #apache channel at
> Someone has a need to be able to encode data as though they were
> entered in an HTML form field.  E.g., if someone put "a & b = c"
> into a form field, it should be encoded into "a%20%26%20b%20%3D%20c".
> There doesn't appear to be anything like this in the httpd API, nor
> does it seem to be in apreq.  Have I missed something, or shall I
> submit a patch to add this?  It seems like a reasonable client-library
> function..

apreq-2 has an apreq_escape() function; it url-encodes anything that
isn't alphanumeric.  httpd has ap_os_escape_path(), but it leaves too
many tokens (i.e. '&' and '=' here) unescaped to be directly useful.
There is a kludge in apache_cookie.c, but it might be better to backport
apreq-2's apreq_escape() code instead.  Not sure where to put it, though.

Joe Schaefer

View raw message