ПРОЕКТЫ 


  АРХИВ 


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


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: [PATCH] fix too much loyality in HTTP method parser
  • From: Sergey Shepelev <temotor@xxxxxxxxx>
  • Date: Tue, 1 Dec 2009 16:21:29 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=SU6VFxe/YzE7+RLrzd7pRdOTPggkNZRf2oCiYj4xJuY=; b=ojwT3hKWt/0sQAxrHrY589Em9ojDIU0j7XgwzSv4fva4qlugiRfT+6gdZRPve+D3pU /O6TrUXizbbK+wctbWnPJ9KuOgN/qSTyWsZXigkQKSIoWiYJq3SVQRTwVDFXiHT/Ov9Y VUa/r3L+LVtr2JB1V8Jb7WH9aQildQmBiqNt0=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DM3BvyJxu8S5lEePBiusNRdHoBQ3J6+Of8uz0bSn150jQUd+yPe2/yCvdbagXkmX+s 5gGzQR95zel2mWbInzfw6cLTEGGpVnnGTzqwWliM3L03GETGgEraO8N8o+uxYVp/odSA bUfYmKbT8QXFQf0CNSl7ISTH0UcqyN8MnuDe0=
  • In-reply-to: <185901259637019@xxxxxxxxxxxxxxxxxxx>
  • References: <185901259637019@xxxxxxxxxxxxxxxxxxx>

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. Но это,
видимо, уже проблема бекенда.

>
> --
> br, Denis F. Latypoff.
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@xxxxxxxxx
> http://nginx.org/mailman/listinfo/nginx-ru
>
>

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


 




Copyright © Lexa Software, 1996-2009.