Wikipedia Gotcha if using a proxy server

I was coding a small proxy server. It worked quite nicely with most webpages. But it had problems with Wikipedia.

Firefox issued a request like this:


but Wikipedia responded with (trimmed down version):

404 Not Found
The resource could not be found.
 Regexp failed to match URI: "http:/"  

However when I deactivated the proxy it worked. First I was puzzled but then I found out what the reason was. It was stated in the HTTP/1.1 Standard ( In Section 5.1.2:

To allow for transition to absoluteURIs in all requests in future versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies.

So this means that Firefox issues other requests if a proxy is configured (absolute URIs instead of relative ones) and that Wikipedia doesn’t obey the HTTP Standard as it should accept the absolute URIs as well

Leave a comment

Your email address will not be published. Required fields are marked *