Welcome! Log In Create A New Profile

Advanced

About the return http status 203

Weibin Yao
April 03, 2013 12:10AM
Hi,

Today In our test box I noticed that nginx sent bad response with 203
response. You can reproduce the problem with the return directive:

location / {
return 203;
}

And the response looks like:

HTTP/1.1
Server: nginx/1.3.14
Date: Wed, 03 Apr 2013 03:54:38 GMT
Content-Type: application/octet-stream
Content-Length: 0
Connection: keep-alive

This is actually not an illegal HTTP/1.1 response.

I noticed the related code in the ngx_http_header_filter_module.c:

53 static ngx_str_t ngx_http_status_lines[] = {
54
55 ngx_string("200 OK"),
56 ngx_string("201 Created"),
57 ngx_string("202 Accepted"),
58 ngx_null_string, /* "203 Non-Authoritative Information" */
59 ngx_string("204 No Content"),
60 ngx_null_string, /* "205 Reset Content" */
61 ngx_string("206 Partial Content"),

It seems this behaviour is expected intentionally. It does not follow the
RFC 2616. If we replace it to be the meaningful status code. Is there any
problem?

Thanks.
--
Weibin Yao
Developer @ Server Platform Team of Taobao
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

About the return http status 203

Weibin Yao 946 April 03, 2013 12:10AM

Re: About the return http status 203

Maxim Dounin 1026 April 03, 2013 07:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 243
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready