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.