mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
added patches for the nginx 1.3.11 core. also excluded the allow_request_body_updating patch.
This commit is contained in:
@ -454,10 +454,10 @@ index efbc244..8d81aab 100644
|
||||
|
||||
diff --git a/src/dtrace/nginx.stp b/src/dtrace/nginx.stp
|
||||
new file mode 100644
|
||||
index 0000000..5bae185
|
||||
index 0000000..8a5a54a
|
||||
--- /dev/null
|
||||
+++ b/src/dtrace/nginx.stp
|
||||
@@ -0,0 +1,269 @@
|
||||
@@ -0,0 +1,278 @@
|
||||
+/* tapset for nginx */
|
||||
+
|
||||
+
|
||||
@ -549,6 +549,10 @@ index 0000000..5bae185
|
||||
+ return @cast(cl, "ngx_chain_t", "NGX_SBIN_PATH")->next
|
||||
+}
|
||||
+
|
||||
+function ngx_buf_tag(b)
|
||||
+{
|
||||
+ return @cast(b, "ngx_buf_t", "NGX_SBIN_PATH")->tag
|
||||
+}
|
||||
+
|
||||
+function ngx_buf_in_memory(b)
|
||||
+{
|
||||
@ -658,9 +662,14 @@ index 0000000..5bae185
|
||||
+ out .= "<flush>"
|
||||
+ }
|
||||
+
|
||||
+ tag = ngx_buf_tag(buf)
|
||||
+ if (tag) {
|
||||
+ out .= sprintf("<tag:%p>", tag)
|
||||
+ }
|
||||
+
|
||||
+ cl = ngx_chain_next(cl)
|
||||
+ if (cl) {
|
||||
+ out .= sprintf(" ")
|
||||
+ out .= " "
|
||||
+ }
|
||||
+ }
|
||||
+ return out
|
||||
@ -891,7 +900,7 @@ index f1f8a48..91bdd64 100644
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
|
||||
index 18402df..1487fef 100644
|
||||
index e02a251..6371fbc 100644
|
||||
--- a/src/http/ngx_http_core_module.c
|
||||
+++ b/src/http/ngx_http_core_module.c
|
||||
@@ -8,6 +8,7 @@
|
||||
@ -911,7 +920,7 @@ index 18402df..1487fef 100644
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
"subrequests cycle while processing \"%V\"", uri);
|
||||
r->main->subrequests = 1;
|
||||
@@ -2491,6 +2494,8 @@ ngx_http_subrequest(ngx_http_request_t *r,
|
||||
@@ -2489,6 +2492,8 @@ ngx_http_subrequest(ngx_http_request_t *r,
|
||||
|
||||
*psr = sr;
|
||||
|
||||
@ -1002,7 +1011,7 @@ index 0000000..d7d2d45
|
||||
+
|
||||
+#endif /* _NGX_HTTP_PROBE_H_INCLUDED_ */
|
||||
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
|
||||
index c44a2cc..fa3bece 100644
|
||||
index ee00fd3..441b5cc 100644
|
||||
--- a/src/http/ngx_http_request.c
|
||||
+++ b/src/http/ngx_http_request.c
|
||||
@@ -8,6 +8,7 @@
|
||||
@ -1013,7 +1022,7 @@ index c44a2cc..fa3bece 100644
|
||||
|
||||
|
||||
static void ngx_http_init_request(ngx_event_t *ev);
|
||||
@@ -865,6 +866,8 @@ ngx_http_process_request_line(ngx_event_t *rev)
|
||||
@@ -861,6 +862,8 @@ ngx_http_process_request_line(ngx_event_t *rev)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1022,7 +1031,7 @@ index c44a2cc..fa3bece 100644
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
|
||||
"http request line: \"%V\"", &r->request_line);
|
||||
|
||||
@@ -1112,6 +1115,8 @@ ngx_http_process_request_headers(ngx_event_t *rev)
|
||||
@@ -1108,6 +1111,8 @@ ngx_http_process_request_headers(ngx_event_t *rev)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1031,7 +1040,7 @@ index c44a2cc..fa3bece 100644
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||
"http header: \"%V: %V\"",
|
||||
&h->key, &h->value);
|
||||
@@ -1962,7 +1967,11 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
@@ -1958,7 +1963,11 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
}
|
||||
|
||||
if (r != r->main && r->post_subrequest) {
|
||||
@ -1043,7 +1052,7 @@ index c44a2cc..fa3bece 100644
|
||||
}
|
||||
|
||||
if (rc == NGX_ERROR
|
||||
@@ -2012,6 +2021,8 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
@@ -2008,6 +2017,8 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
|
||||
if (r->buffered || r->postponed) {
|
||||
|
||||
@ -1052,7 +1061,7 @@ index c44a2cc..fa3bece 100644
|
||||
if (ngx_http_set_write_handler(r) != NGX_OK) {
|
||||
ngx_http_terminate_request(r, 0);
|
||||
}
|
||||
@@ -2048,10 +2059,14 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
@@ -2044,10 +2055,14 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
pr->postponed = pr->postponed->next;
|
||||
}
|
||||
|
||||
@ -1067,7 +1076,7 @@ index c44a2cc..fa3bece 100644
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
|
||||
"http finalize non-active request: \"%V?%V\"",
|
||||
&r->uri, &r->args);
|
||||
@@ -2063,6 +2078,8 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
@@ -2059,6 +2074,8 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1077,7 +1086,7 @@ index c44a2cc..fa3bece 100644
|
||||
r->main->count++;
|
||||
ngx_http_terminate_request(r, 0);
|
||||
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
|
||||
index d0a8ecc..40b2061 100644
|
||||
index 3c69d05..89858d0 100644
|
||||
--- a/src/http/ngx_http_request_body.c
|
||||
+++ b/src/http/ngx_http_request_body.c
|
||||
@@ -8,6 +8,7 @@
|
||||
@ -1091,7 +1100,7 @@ index d0a8ecc..40b2061 100644
|
||||
@@ -40,11 +41,15 @@ ngx_http_read_client_request_body(ngx_http_request_t *r,
|
||||
r->main->count++;
|
||||
|
||||
if (r->request_body || r->discard_body || r->content_length_n == 0) {
|
||||
if (r->request_body || r->discard_body) {
|
||||
+ ngx_http_probe_read_body_abort(r,
|
||||
+ r->request_body ? "body exists"
|
||||
+ : "body discarded");
|
||||
|
||||
Reference in New Issue
Block a user