httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@rowe-clan.net>
Subject Re: bug? Inconsistent handling of query string
Date Fri, 15 Feb 2013 16:49:09 GMT
On Fri, 15 Feb 2013 10:38:40 -0500
Mark Stosberg <mark@summersault.com> wrote:

> 
> I'd like feedback on whether the following behavior is a bug, or
> intentionally inconsistent.
> 
> I was looking at the environment variables generated by this case:
> 
>    Browser URL: /file%3Fa=b?c=d
> 
>    'QUERY_STRING' => 'a=b&c=d',
>    'SCRIPT_URL' => '/file?a=b',
>    'SCRIPT_URI' => 'http://example.com/file?a=b',
>    'REQUEST_URI' => '/file%3Fa=b?c=d',
> 
> The "%3F" is an encoded question mark.
> 
> Note that SCRIPT_URI and SCRIPT_URL treat the query string as starting
> after the unencoded question mark, while 'QUERY_STRING' variables
> treats the query string as started at the encoded question mark.
> 
> >From my reading of RFC 3875 (CGI), my understanding is that only an
> unencoded question mark should mark the beginning the query string.
> Thus, it appears that the QUERY_STRING variable being returned here is
> incorrect. Is it?

I agree with your interpretation.  However, we pick apart QUERY_STRING
long after %-escapes are transcoded.  That could be the issue.

> This data was generated with Apache/2.2.14.

Was mod_rewrite involved in any way with processing this request?

> Thanks!
> 
>    Mark  Stosberg
> 
> 


Mime
View raw message