Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error_page and Content-Length: 0
- To: nginx-ru@xxxxxxxxx
- Subject: Re: error_page and Content-Length: 0
- From: ash2k - <ash2kk@xxxxxxxxx>
- Date: Wed, 16 Dec 2009 10:35:58 +0500
- 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=gOxyniYk4yMuQkNwMBp9xQnRcc3sLYexNJXR8qL04T0=; b=SD1d4vc2XY0t+m7cVnGyi2Y8P4uJjtWHvSleLyb50M53GjSjW5mmA/6X683oM/iPPp zsEmgEe/rhJTpWHdh+WB4gpFp+vZv4w/Dwj1ad7/ZJGPoj9og1PVZqgP2X5VPoLh4sZa cBPLNaqpuq1HEAcsKaCkgBMct5sp+2fpL3FS8=
- 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=kgGnl0TEqeNLYTRQbwMlX3Nk1uGjB+STruY/NwvNd3Swah4DMhEtXtrPU+aA2+j3nY CNhdzsxSnRZeBbfMjVD7xhJUtBgkmXH0eEwI9poT+bRqrMdjCe0VgXzHp1BmnFYKzGFv V656OdZd4D09nzgYSJ0PTLk1H/U66E3WUMmps=
- In-reply-to: <59947dcd0912140313m60b66dc2y4bc22d46968308bc@xxxxxxxxxxxxxx>
- References: <59947dcd0912140313m60b66dc2y4bc22d46968308bc@xxxxxxxxxxxxxx>
ðÏÔÅÓÔÉÒÏ×ÁÌ ÍÅÎÅÅ ÚÁÍÏÒÏÞÅÎÎÕÀ ËÏÎÆÉÇÕÒÁÃÉÀ
location = /d {
set $box_filename
dontexist.png;
set $box_newMaxWidth 100;
set $box_newMaxHeight 100;
set $box_cutHeight 0;
error_page 404 @boxUniversal404;
mogilefs_domain <domain>;
mogilefs_methods GET;
mogilefs_tracker <ip>:<port>;
mogilefs_pass $box_filename {
proxy_pass $mogilefs_path;
proxy_hide_header Content-Type;
proxy_buffering off;
}
}
é ×ÓÅ ÒÁ×ÎÏ ÚÁÇÏÌÏ×ÏË ÏÓÔÁÅÔÓÑ. äÕÍÁÀ ÅÇÏ ÄÏÂÁ×ÌÑÅÔ mogilefs_module. ÷
ÉÔÏÇÅ ÒÅÛÉÌ ÐÒÏÂÌÅÍÕ ×ÙÄÁÞÅÊ ÚÁÇÏÌÏ×ËÁ Content-Length ÉÚ PHP.
14 ÄÅËÁÂÒÑ 2009 Ç. 16:13 ÐÏÌØÚÏ×ÁÔÅÌØ ash2k - <ash2kk@xxxxxxxxx> ÎÁÐÉÓÁÌ:
> úÄÒÁ×ÓÔ×ÕÊÔÅ! ðÏÍÏÇÉÔÅ ÐÏÖÁÌÕÊÓÔÁ ÒÁÚÏÂÒÁÔØÓÑ Ó ÐÒÏÂÌÅÍÏÊ.
>
> FreeBSD 7.2-STABLE amd62, nginx/0.7.64
> -------------------------------------------
> $ telnet 127.0.0.1 5190
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET /a HTTP/1.0
>
> HTTP/1.1 200 OK
> Server: nginx
> Date: Mon, 14 Dec 2009 10:32:34 GMT
> Content-Type: image/png
> Connection: close
> -------------------------------------------
> $ telnet 127.0.0.1 5190
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET /b HTTP/1.0
>
> HTTP/1.1 404 Not Found
> Server: nginx
> Date: Mon, 14 Dec 2009 10:38:20 GMT
> Content-Type: image/png
> Connection: close
> -------------------------------------------
> $ telnet 127.0.0.1 5190
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET /c HTTP/1.0
>
> HTTP/1.1 404 Not Found
> Server: nginx
> Date: Mon, 14 Dec 2009 10:40:10 GMT
> Content-Type: image/png
> Content-Length: 0
> Connection: close
> -------------------------------------------
> îÅÐÏÎÑÔÎÏ ÏÔËÕÄÁ ÂÅÒÅÔÓÑ ÚÁÇÏÌÏ×ÏË "Content-Length: 0" - × PHP ÓËÒÉÐÔÅ
> ÅÇÏ ÎÅÔ ÄÁ É ÅÓÌÉ ÄÏÂÁ×ÉÔØ fastcgi_hide_header Content-Length ÔÏ ÏÎ
> ÏÓÔÁÅÔÓÑ.
> ÷Ï ×ÓÅÈ ÔÒÅÈ ÓÌÕÞÁÑÈ ÏÔÄÁÅÔÓÑ ÎÏÒÍÁÌØÎÁÑ PNGÛËÁ, ÎÏ × ÐÏÓÌÅÄÎÅÍ
> ÂÒÁÕÚÅÒ ÅÅ ÎÅ ÏÔÏÂÒÁÖÁÅÔ ÉÚ-ÚÁ "Content-Length: 0" ×ÉÄÉÍÏ.
> ìÏÇÉËÁ ÒÁÂÏÔÙ ÐÏÓÌÅÄÎÅÇÏ (/c) location:
> 1. ÐÙÔÁÅÍÓÑ ÓÞÉÔÁÔØ ÉÚ mogilefs ÎÅÓÕÝÅÓÔ×ÕÀÝÅÊ ÆÁÊÌ
> 2. ÎÁ 404 ÐÅÒÅÈÏÄÉÍ × @boxMogilefs
> 3. PHP ÓËÒÉÐÔ ×ÏÚ×ÒÁÝÁÅÔ 404
> 4. ÎÁ 404 ÐÅÒÅÈÏÄÉÍ × @boxUniversal404
> 5. PHP ×ÏÚ×ÒÁÝÁÅÔ PNGÛËÕ
>
> ëÏÎÆÉÇ:
>
> server {
> š š š šlisten š š š š š š š š š š š š š š š š š127.0.0.1:5190
> default;
> š š š šaccess_log š š š š š š š š š š š š š š šoff;
> š š š šproxy_intercept_errors š š š š š š š š šon;
> š š š šfastcgi_intercept_errors š š š š š š š šon;
> š š š šrecursive_error_pages š š š š š š š š š on;
> š š š šerror_page š š š š š š š š š š š š š š š404
> /img/imagenotfound.png;
>
> š š š šlocation /img/ {
> š š š š š šroot š š š š š š š š š š š š š š š š/home/cropbox/www/linkme;
> š š š š}
>
> š š š šlocation = /a {
> š š š š š š š šset š š š š š š š š š š š š š š $box_source
> /home/app_cropbox/img/imagenotfound.png;
> š š š š š š š šinclude š š š š š š š š š š š š fastcgi_params;
> š š š š š š š šfastcgi_param š š š š š š š š š SCRIPT_FILENAME
> /home/app_cropbox/cropbox/boxUniversal.php;
> š š š š š š š šfastcgi_param š š š š š š š š š QUERY_STRING
> source=$box_source&newMaxWidth=100&newMaxHeight=100&cutHeight=0;
> š š š š š š š šfastcgi_pass š š š š š š š š š šcropbox;
> š š š š}
> š š š šlocation = /b {
> š š š š š š š šerror_page š š š š š š š š š š š404 @boxUniversal404;
> š š š š š š š šset š š š š š š š š š š š š š š $box_filename
> donotexist.png;
> š š š š š š š šset š š š š š š š š š š š š š š $box_newMaxWidth 100;
> š š š š š š š šset š š š š š š š š š š š š š š $box_newMaxHeight 100;
> š š š š š š š šset š š š š š š š š š š š š š š $box_cutHeight 0;
> š š š š š š š šreturn 404;
> š š š š}
> š š š šlocation = /c {
> š š š š š š š šset š š š š š š š š š š š š š š $box_filename dontexist.png;
> š š š š š š š šset š š š š š š š š š š š š š š $box_newMaxWidth 100;
> š š š š š š š šset š š š š š š š š š š š š š š $box_newMaxHeight 100;
> š š š š š š š šset š š š š š š š š š š š š š š $box_cutHeight 0;
> š š š š š š š šerror_page š š š š š š š š š š š404 = @boxMogilefs;
> š š š š š š š šmogilefs_domain š š š š š š š š <domain>;
> š š š š š š š šmogilefs_methods š š š š š š š šGET;
> š š š š š š š šmogilefs_tracker š š š š š š š š<ip>:<port>;
> š š š š š š š šmogilefs_pass $box_filename {
> š š š š š š š š š šproxy_pass š š š š š š š š š$mogilefs_path;
> š š š š š š š š š šproxy_hide_header š š š š š Content-Type;
> š š š š š š š š š šproxy_buffering š š š š š š off;
> š š š š š š š š}
> š š š š}
> š š š šlocation @boxUniversal404 {
> š š š š š š š šset š š š š š š š š š š š š š š $box_source
> /home/app_cropbox/img/imagenotfound.png;
> š š š š š š š šerror_page š š š š š š š š š š š404 /img/imagenotfound.png;
> š š š š š š š šinclude š š š š š š š š š š š š fastcgi_params;
> š š š š š š š šfastcgi_param š š š š š š š š š SCRIPT_FILENAME
> /home/app_cropbox/cropbox/boxUniversal.php;
> š š š š š š š šfastcgi_param š š š š š š š š š QUERY_STRING
> source=$box_source&newMaxWidth=$box_newMaxWidth&newMaxHeight=$box_newMaxHeight&cutHeight=$box_cutHeight;
> š š š š š š š šfastcgi_pass š š š š š š š š š šcropbox;
> š š š š}
> š š š šlocation @boxMogilefs {
> š š š š š š š šerror_page š š š š š š š š š š š404 @boxUniversal404;
> š š š š š š š šinclude š š š š š š š š š š š š fastcgi_params;
> # š š š š š š š šfastcgi_hide_header š š š š š š Content-Length;
> š š š š š š š šfastcgi_param š š š š š š š š š SCRIPT_FILENAME
> /home/app_cropbox/cropbox/boxMogilefs.php;
> š š š š š š š šfastcgi_param š š š š š š š š š QUERY_STRING
> filename=$box_filename&newMaxWidth=$box_newMaxWidth&newMaxHeight=$box_newMaxHeight&cutHeight=$box_cutHeight;
> š š š š š š š šfastcgi_pass š š š š š š š š š šcropbox;
> š š š š}
> }
>
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|