ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix too much loyality in HTTP method parser



On Tue, Dec 01, 2009 at 04:21:29PM +0300, Sergey Shepelev wrote:

> 2009/12/1 Denis F. Latypoff <latypoff@xxxxxxxxx>:
> > Патч фиксит вот такое:
> >
> > [root@c1 c1]# telnet rambler.ru 80
> > Trying 81.19.70.3...
> > Connected to rambler.ru (81.19.70.3).
> > Escape character is '^]'.
> > HI_THERE / HTTP/1.0
> > Host: rambler.ru
> >
> > HTTP/1.1 302 Moved Temporarily
> > Server: nginx/0.8.28
> > Date: Tue, 01 Dec 2009 03:09:30 GMT
> > Content-Type: text/html
> > Content-Length: 161
> > Connection: close
> > Location: http://www.rambler.ru/
> >
> > <html>
> > <head><title>302 Found</title></head>
> > <body bgcolor="white">
> > <center><h1>302 Found</h1></center>
> > <hr><center>nginx/0.8.28</center>
> > </body>
> > </html>
> > Connection closed by foreign host.
> >
> > :-)
> 
> А что здесь фиксить? Очевидно, настроено правило типа rewrite ^
> http://www.rambler.ru$request_uri для server_name rambler.ru. Парсится
> URI, по нему редирект. На метод тут вообще смотреть не надо. Где
> ошибка?
> 
> $ curl -v -X HOLA http://www.rambler.ru/
> * About to connect() to www.rambler.ru port 80 (#0)
> *   Trying 81.19.70.1... connected
> * Connected to www.rambler.ru (81.19.70.1) port 80 (#0)
> > HOLA / HTTP/1.1
> > User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g 
> > zlib/1.2.3.3 libidn/1.15
> > Host: www.rambler.ru
> > Accept: */*
> >
> < HTTP/1.1 302 Moved Temporarily
> < Server: nginx/0.8.28
> < Date: Tue, 01 Dec 2009 13:18:54 GMT
> < Content-Type: text/html
> < Content-Length: 161
> < Connection: keep-alive
> < Keep-Alive: timeout=50
> < Location: http://www.rambler.ru/
> < Set-Cookie: dv=gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:1259673534; path=/;
> expires=Thu, 31-Dec-37 23:55:55 GMT
> < Set-Cookie: dvr=gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:1259673534;
> domain=.rambler.ru; path=/; expires=Thu, 31-Dec-37 23:55:55 GMT
> < Set-Cookie: lv=1259673534; path=/; expires=Thu, 31-Dec-37 23:55:55 GMT
> < Set-Cookie: lvr=1259673534; domain=.rambler.ru; path=/; expires=Thu,
> 31-Dec-37 23:55:55 GMT
> < Set-Cookie: ruid=AQAAAL4XFUuJX9dQASsUAAB=; expires=Thu, 31-Dec-37
> 23:55:55 GMT; domain=.rambler.ru; path=/
> < P3P: CP="NON DSP NID ADMa DEVa TAIa PSAa PSDa OUR IND UNI COM NAV"
> <
> <html>
> <head><title>302 Found</title></head>
> <body bgcolor="white">
> <center><h1>302 Found</h1></center>
> <hr><center>nginx/0.8.28</center>
> </body>
> </html>
> * Connection #0 to host www.rambler.ru left intact
> * Closing connection #0
> 
> А вот здесь уже есть проблема. Спросили www.rambler.ru/ ответили 302
> www.rambler.ru/. Циклический редирект. Должно быть 405. Но это,
> видимо, уже проблема бекенда.

На 405 стоит редирект на www.rambler.ru, потому что MSIE иногда слали POSTы.


-- 
Игорь Сысоев
http://sysoev.ru

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.