Welcome! Log In Create A New Profile

Advanced

Re: About status code 202 and the put method

June 07, 2010 09:16AM
On Mon, Jun 07, 2010 at 09:01:57AM +0800, jyf832004 wrote:

> Hi,all:
> I have two questions:first,I want to use status code 202,but I find that it is null string.Can it set by modifying the source codes or some other ways?

The attached patch adds 202 code.

> second:I want to use the put method with the content length of 0,but nginx doesn't allow it with length required.

You should set "Content-Length: 0"


--
Igor Sysoev
http://sysoev.ru/en/
Index: src/http/ngx_http_request.h
===================================================================
--- src/http/ngx_http_request.h (revision 2922)
+++ src/http/ngx_http_request.h (working copy)
@@ -64,6 +64,7 @@

#define NGX_HTTP_OK 200
#define NGX_HTTP_CREATED 201
+#define NGX_HTTP_ACCEPTED 202
#define NGX_HTTP_NO_CONTENT 204
#define NGX_HTTP_PARTIAL_CONTENT 206

Index: src/http/ngx_http_header_filter_module.c
===================================================================
--- src/http/ngx_http_header_filter_module.c (revision 2922)
+++ src/http/ngx_http_header_filter_module.c (working copy)
@@ -53,7 +53,7 @@

ngx_string("200 OK"),
ngx_string("201 Created"),
- ngx_null_string, /* "202 Accepted" */
+ ngx_string("202 Accepted"),
ngx_null_string, /* "203 Non-Authoritative Information" */
ngx_string("204 No Content"),
ngx_null_string, /* "205 Reset Content" */
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

About status code 202 and the put method

jyf832004 3121 June 06, 2010 09:04PM

Re: About status code 202 and the put method

Igor Sysoev 1538 June 07, 2010 09:16AM



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

Online Users

Guests: 267
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