Requests with full URIs

Igor Sysoev is at rambler-co.ru
Wed Sep 26 15:30:13 MSD 2007


On Tue, Sep 25, 2007 at 02:44:23PM -0300, James Oakley wrote:

> On September 24, 2007, Igor Sysoev wrote:
> > On Mon, Sep 24, 2007 at 11:26:29AM -0300, James Oakley wrote:
> > > I've noticed that Nginx supports full URIs in requests, which is great,
> > > since I need to be able to respond to proxy requests.
> > >
> > > I have noticed one problem, though. If I request a URI like so:
> > >
> > > curl -x 127.0.0.1:80 http://www.google.com/
> > >
> > > It works, and I get the correct response (I'm using empty_gif to test
> > > this)
> > >
> > > If I leave the trailing slash, however, I get a 400 instead:
> > >
> > > curl -x 127.0.0.1:80 http://www.google.com
> > > <html>
> > > <head><title>400 Bad Request</title></head>
> > > <body bgcolor="white">
> > > <center><h1>400 Bad Request</h1></center>
> > > <hr><center>nginx/0.5.31</center>
> > > </body>
> > > </html>
> > >
> > > I have attached a patch that appears to fix the problem, but I have only
> > > just started looking at the code and I have no idea whether this was the
> > > correct way to fix it.
> >
> > How does Apache treat this request ?
> 
> I just checked, and both are considered valid.

Thank you. I will fix it.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list