[fpc-devel] FPC bug tracker page is sniffing user agents?
ABorka
fpc-devel at aborka.com
Sun Sep 25 19:06:03 CEST 2011
On 9/25/2011 02:54, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> Accessing http://bugs.freepascal.org/login_page.php
>
> Using the following user agent (Opera in Mac OS X):
>
> Opera/9.80 (Macintosh; Intel Mac OS X 10.6.1; U; en) Presto/2.9.168
> Version/11.50
>
> I get:
>
> HTTP/1.1 400 Bad Request
> Date: Sun, 25 Sep 2011 09:48:31 GMT
> Server: Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.4-2ubuntu5.17
> with Suhosin-Patch
> Vary: Accept-Encoding
> Content-Length: 514
> Connection: close
> Content-Type: text/html; charset=iso-8859-1
>
> Size=514
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>400 Bad Request</title>
> </head><body>
> <h1>Bad Request</h1>
> <p>Your browser sent a request that this server could not understand.<br />
> Request header field is missing ':' separator.<br />
> <pre>
> Opera/9.80 (Macintosh; Intel Mac OS X 10.6.1; U; en) Presto/2.9.168
> Version/11.50</pre>
> </p>
> <hr>
> <address>Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.4-2ubuntu5.17
> with Suhosin-Patch Server at bugs.freepascal.org Port 80</address>
> </body></html>
>
> If I use the user agent from Firefox I get the propor page.
>
> I tested with a program written in fpc which can be found here (and
> with the browsers too, of course):
> http://p-tools.svn.sourceforge.net/viewvc/p-tools/httpclient/
>
> Any ideas?
>
> AFAIK we don't have a special version of our pages, so I suppose that
> we should not sniff user agents.
>
> thanks,
It might be totally unrelated (not sure if the bugs site uses fpweb) but
we had a bug with content length being incorrect when an error message
was generated in fpweb (was fixed in revision 17597).
Different browsers handle the content-length header value differently,
even the same browser handles it differently on different OS-es
(sometimes ignores it and uses the full response page, sometimes it cuts
the response page to the content-length header value which can be a
problem if the value is incorrect).
AB
More information about the fpc-devel
mailing list