diff src/http/ngx_http_parse.c @ 182:13710a1813ad NGINX_0_3_38

nginx 0.3.38 *) Feature: the ngx_http_dav_module. *) Change: the ngx_http_perl_module optimizations. Thanks to Sergey Skvortsov. *) Feature: the ngx_http_perl_module supports the $r->request_body_file method. *) Feature: the "client_body_in_file_only" directive. *) Workaround: now on disk overflow nginx tries to write access logs once a second only. Thanks to Anton Yuzhaninov and Maxim Dounin. *) Bugfix: now the "limit_rate" directive more precisely limits rate if rate is more than 100 Kbyte/s. Thanks to ForJest. *) Bugfix: now the IMAP/POP3 proxy escapes the "\r" and "\n" symbols in login and password to pass authorization server. Thanks to Maxim Dounin.
author Igor Sysoev <http://sysoev.ru>
date Fri, 14 Apr 2006 00:00:00 +0400
parents 3080c5392b89
children 54aabf2b0bc6
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -71,6 +71,9 @@ ngx_http_parse_request_line(ngx_http_req
 
                     if (m[0] == 'G' && m[1] == 'E' && m[2] == 'T') {
                         r->method = NGX_HTTP_GET;
+
+                    } else if (m[0] == 'P' && m[1] == 'U' && m[2] == 'T') {
+                        r->method = NGX_HTTP_PUT;
                     }
 
                 } else if (p - m == 4) {
@@ -85,6 +88,14 @@ ngx_http_parse_request_line(ngx_http_req
                     {
                         r->method = NGX_HTTP_HEAD;
                     }
+
+                } else if (p - m == 6) {
+
+                    if (m[0] == 'D' && m[1] == 'E' && m[2] == 'L'
+                        && m[3] == 'E' && m[4] == 'T' && m[5] == 'E')
+                    {
+                        r->method = NGX_HTTP_DELETE;
+                    }
                 }
 
                 state = sw_spaces_before_uri;