comparison src/http/ngx_http_core_module.c @ 286:5bef04fc3fd5 NGINX_0_5_13

nginx 0.5.13 *) Feature: the COPY and MOVE methods. *) Bugfix: the ngx_http_realip_module set garbage for requests passed via keep-alive connection. *) Bugfix: nginx did not work on big-endian 64-bit Linux. Thanks to Andrei Nigmatulin. *) Bugfix: now when IMAP/POP3 proxy receives too long command it closes the connection right away, but not after timeout. *) Bugfix: if the "epoll" method was used and a client closed a connection prematurely, then nginx closed the connection after a send timeout only. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc and ppc; bug appeared in 0.5.8.
author Igor Sysoev <http://sysoev.ru>
date Mon, 19 Feb 2007 00:00:00 +0300
parents 704622b2528a
children 27d9d1f26b38
comparison
equal deleted inserted replaced
285:0e505c8b6528 286:5bef04fc3fd5
10 #include <ngx_http.h> 10 #include <ngx_http.h>
11 #include <nginx.h> 11 #include <nginx.h>
12 12
13 13
14 typedef struct { 14 typedef struct {
15 char *name; 15 u_char *name;
16 uint32_t method; 16 uint32_t method;
17 } ngx_http_method_name_t; 17 } ngx_http_method_name_t;
18 18
19 19
20 #define NGX_HTTP_LOCATION_EXACT 1 20 #define NGX_HTTP_LOCATION_EXACT 1
1245 } 1245 }
1246 1246
1247 encoded = r->headers_in.authorization->value; 1247 encoded = r->headers_in.authorization->value;
1248 1248
1249 if (encoded.len < sizeof("Basic ") - 1 1249 if (encoded.len < sizeof("Basic ") - 1
1250 || ngx_strncasecmp(encoded.data, "Basic ", sizeof("Basic ") - 1) != 0) 1250 || ngx_strncasecmp(encoded.data, (u_char *) "Basic ",
1251 sizeof("Basic ") - 1)
1252 != 0)
1251 { 1253 {
1252 r->headers_in.user.data = (u_char *) ""; 1254 r->headers_in.user.data = (u_char *) "";
1253 return NGX_DECLINED; 1255 return NGX_DECLINED;
1254 } 1256 }
1255 1257
2679 return NGX_CONF_OK; 2681 return NGX_CONF_OK;
2680 } 2682 }
2681 2683
2682 2684
2683 static ngx_http_method_name_t ngx_methods_names[] = { 2685 static ngx_http_method_name_t ngx_methods_names[] = {
2684 { "GET", (uint32_t) ~NGX_HTTP_GET }, 2686 { (u_char *) "GET", (uint32_t) ~NGX_HTTP_GET },
2685 { "HEAD", (uint32_t) ~NGX_HTTP_HEAD }, 2687 { (u_char *) "HEAD", (uint32_t) ~NGX_HTTP_HEAD },
2686 { "POST", (uint32_t) ~NGX_HTTP_POST }, 2688 { (u_char *) "POST", (uint32_t) ~NGX_HTTP_POST },
2687 { "PUT", (uint32_t) ~NGX_HTTP_PUT }, 2689 { (u_char *) "PUT", (uint32_t) ~NGX_HTTP_PUT },
2688 { "DELETE", (uint32_t) ~NGX_HTTP_DELETE }, 2690 { (u_char *) "DELETE", (uint32_t) ~NGX_HTTP_DELETE },
2689 { "MKCOL", (uint32_t) ~NGX_HTTP_MKCOL }, 2691 { (u_char *) "MKCOL", (uint32_t) ~NGX_HTTP_MKCOL },
2690 { "COPY", (uint32_t) ~NGX_HTTP_COPY }, 2692 { (u_char *) "COPY", (uint32_t) ~NGX_HTTP_COPY },
2691 { "MOVE", (uint32_t) ~NGX_HTTP_MOVE }, 2693 { (u_char *) "MOVE", (uint32_t) ~NGX_HTTP_MOVE },
2692 { "OPTIONS", (uint32_t) ~NGX_HTTP_OPTIONS }, 2694 { (u_char *) "OPTIONS", (uint32_t) ~NGX_HTTP_OPTIONS },
2693 { "PROPFIND" , (uint32_t) ~NGX_HTTP_PROPFIND }, 2695 { (u_char *) "PROPFIND" , (uint32_t) ~NGX_HTTP_PROPFIND },
2694 { "PROPPATCH", (uint32_t) ~NGX_HTTP_PROPPATCH }, 2696 { (u_char *) "PROPPATCH", (uint32_t) ~NGX_HTTP_PROPPATCH },
2695 { "LOCK", (uint32_t) ~NGX_HTTP_LOCK }, 2697 { (u_char *) "LOCK", (uint32_t) ~NGX_HTTP_LOCK },
2696 { "UNLOCK", (uint32_t) ~NGX_HTTP_UNLOCK }, 2698 { (u_char *) "UNLOCK", (uint32_t) ~NGX_HTTP_UNLOCK },
2697 { NULL, 0 } 2699 { NULL, 0 }
2698 }; 2700 };
2699 2701
2700 2702
2701 static char * 2703 static char *