ðòïåëôù 


  áòèé÷ 


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: true 414 status code



óÐÁÓÉÂÏ ÐÏÞÉÎÉÌÏÓØ.
ðÕÓÔØ ÔÕÔ ÐÏÌÅÖÉÔ:

--- src/http/ngx_http_header_filter_module.c.orig 2013-05-13 10:43:28.000000000 +0000
+++ src/http/ngx_http_header_filter_module.c 2013-09-05 14:37:15.011369647 +0000
@@ -92,10 +92,7 @@
š š šngx_string("411 Length Required"),
š š šngx_string("412 Precondition Failed"),
š š šngx_string("413 Request Entity Too Large"),
- š šngx_null_string, š/* "414 Request-URI Too Large", but we never send it
- š š š š š š š š š š š * because we treat such requests as the HTTP/0.9
- š š š š š š š š š š š * requests and send only a body without a header
- š š š š š š š š š š š */
+ š šngx_string("414 Request-URI Too Large"),
š š šngx_string("415 Unsupported Media Type"),
š š šngx_string("416 Requested Range Not Satisfiable"),
š
@@ -270,6 +267,12 @@
š š š š š š šlen += NGX_INT_T_LEN;
š š š š š š šstatus_line = NULL;
š š š š š}
+
+ š š š šif (status_line && status_line->len == 0) {
+ š š š š š šstatus = r->headers_out.status;
+ š š š š š šlen += NGX_INT_T_LEN;
+ š š š š š šstatus_line = NULL;
+ š š š š}
š š š}
š
š š šclcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);


On Wed, Sep 4, 2013 at 1:51 PM, ÷ÁÌÅÎÔÉÎ âÁÒÔÅÎÅ× <vbart@xxxxxxxxx> wrote:
On Wednesday 04 September 2013 13:54:18 Vladimir Getmanshchuk wrote:
> äÁÖÅ ÉÄÉÏÔÉÚÍ ÔÉÐÁ:
>
> š š š š error_page 414 =414 @414;
>
> š š š š location @414 {
> š š š š š return 414;
> š š š š }
> ÎÅ ÄÁÌ ÒÅÚÕÌØÔÁÔ - ÐÏÌÕÞÁÀ 200
>
> 2013/09/04 09:40:10 [info] 5564#0: *45 client sent too long URI while
> reading client request line, client: 123.123.123.123, server:
> host.example.com, request: "GET
> /file.php?qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasd
> fghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiop
> asdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyu
> iopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwer
> tyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmq
> wertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvb
> nmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzx
> cvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjk
> lzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfg
> hjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopas
> dfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuio
> pasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwerty
> uiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwe
> rtyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm
> qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcv
> bnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklz
> xcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghj
> klzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdf
> ghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopa
> sdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyui
> opasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwert
> yuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqw
> ertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbn
> mqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxc
> vbnmqwertyuiopasdfghjklzxcvbnmqwer 2013/09/04 09:40:10 [debug] 5564#0: *45
> http finalize request: 414, "?" a:1, c:1
> 2013/09/04 09:40:10 [debug] 5564#0: *45 event timer del: 15: 1378287669763
> 2013/09/04 09:40:10 [debug] 5564#0: *45 http special response: 414, "?"
> 2013/09/04 09:40:10 [debug] 5564#0: *45 test location: "@414"
> 2013/09/04 09:40:10 [debug] 5564#0: *45 using location: @414 "?"
> 2013/09/04 09:40:10 [debug] 5564#0: *45 rewrite phase: 3
> 2013/09/04 09:40:10 [debug] 5564#0: *45 http finalize request: 414, "?"
> a:1, c:2
> 2013/09/04 09:40:10 [debug] 5564#0: *45 http special response: 414, "?"
> 2013/09/04 09:40:10 [debug] 5564#0: *45 http set discard body
> 2013/09/04 09:40:10 [debug] 5564#0: *45 xslt filter header
> 2013/09/04 09:40:10 [debug] 5564#0: *45 HTTP/1.1
> Server: nginx/1.2.9
> Date: Wed, 04 Sep 2013 09:40:10 GMT
> Content-Type: text/html
> Content-Length: 192
> Connection: close
>
[..]

üÔÏ ÎÅ 200, Á ÐÒÏÓÔÏ ÎÅ×ÁÌÉÄÎÙÊ ÏÔ×ÅÔ. šðÁÔÞ, ÉÓÐÒÁ×ÌÑÀÝÉÊ ÐÒÏÂÌÅÍÕ, ÕÖÅ ÌÅÖÉÔ
ÎÁ ÒÅ×ØÀ: http://mailman.nginx.org/pipermail/nginx-devel/2013-April/003609.html

ðÌÀÓ ×ÄÏÇÏÎËÕ ÅÝ£ ÏÄÉÎ:

# HG changeset patch
# User Valentin Bartenev <vbart@xxxxxxxxx>
# Date 1378228039 -14400
# Node ID 9f8ebfbe04f28544fd9cfc1473679aee13202506
# Parent š659464c695b7c70f64207462d0e1a4ee3d018583
Return reason phrase for 414.

After 62be77b0608f nginx can return this code.

diff -r 659464c695b7 -r 9f8ebfbe04f2 src/http/ngx_http_header_filter_module.c
--- a/src/http/ngx_http_header_filter_module.c šMon Sep 02 20:06:03 2013 +0400
+++ b/src/http/ngx_http_header_filter_module.c šTue Sep 03 21:07:19 2013 +0400
@@ -92,10 +92,7 @@ static ngx_str_t ngx_http_status_lines[]
š š šngx_string("411 Length Required"),
š š šngx_string("412 Precondition Failed"),
š š šngx_string("413 Request Entity Too Large"),
- š šngx_null_string, š/* "414 Request-URI Too Large", but we never send it
- š š š š š š š š š š š * because we treat such requests as the HTTP/0.9
- š š š š š š š š š š š * requests and send only a body without a header
- š š š š š š š š š š š */
+ š šngx_string("414 Request-URI Too Large"),
š š šngx_string("415 Unsupported Media Type"),
š š šngx_string("416 Requested Range Not Satisfiable"),


--
÷ÁÌÅÎÔÉÎ

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



--
Yours sincerely,
Vladimir Getmanshchuk
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.