[nginx] Stop emulating a space character after r->method_name.

Ruslan Ermilov ru at nginx.com
Tue Dec 1 17:21:03 UTC 2015


details:   http://hg.nginx.org/nginx/rev/1d696c646d81
branches:  
changeset: 6312:1d696c646d81
user:      Ruslan Ermilov <ru at nginx.com>
date:      Mon Nov 30 12:54:01 2015 +0300
description:
Stop emulating a space character after r->method_name.

This is an API change.

The proxy module was modified to not depend on this in 44122bddd9a1.
No known third-party modules seem to depend on this.

diffstat:

 src/http/ngx_http_core_module.c |  2 +-
 src/http/v2/ngx_http_v2.c       |  3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 44122bddd9a1 -r 1d696c646d81 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c	Fri Nov 06 15:21:51 2015 +0300
+++ b/src/http/ngx_http_core_module.c	Mon Nov 30 12:54:01 2015 +0300
@@ -776,7 +776,7 @@ ngx_module_t  ngx_http_core_module = {
 };
 
 
-ngx_str_t  ngx_http_core_get_method = { 3, (u_char *) "GET " };
+ngx_str_t  ngx_http_core_get_method = { 3, (u_char *) "GET" };
 
 
 void
diff -r 44122bddd9a1 -r 1d696c646d81 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c	Fri Nov 06 15:21:51 2015 +0300
+++ b/src/http/v2/ngx_http_v2.c	Mon Nov 30 12:54:01 2015 +0300
@@ -3294,9 +3294,6 @@ ngx_http_v2_construct_request_line(ngx_h
 
     ngx_memcpy(p, ending, sizeof(ending));
 
-    /* some modules expect the space character after method name */
-    r->method_name.data = r->request_line.data;
-
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "http2 http request line: \"%V\"", &r->request_line);
 



More information about the nginx-devel mailing list