Commit 6a63c718 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

fix bug on publisher which let to many open connections on some nginx versions

parent 39f8e0bc
...@@ -112,8 +112,6 @@ ngx_http_push_stream_send_buf_response(ngx_http_request_t *r, ngx_buf_t *buf, co ...@@ -112,8 +112,6 @@ ngx_http_push_stream_send_buf_response(ngx_http_request_t *r, ngx_buf_t *buf, co
r->keepalive = 0; r->keepalive = 0;
r->headers_out.status = status_code; r->headers_out.status = status_code;
ngx_http_discard_request_body(r);
r->discard_body = 1;
rc = ngx_http_send_header(r); rc = ngx_http_send_header(r);
if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
...@@ -242,9 +240,6 @@ ngx_http_push_stream_send_response_all_channels_info_detailed(ngx_http_request_t ...@@ -242,9 +240,6 @@ ngx_http_push_stream_send_response_all_channels_info_detailed(ngx_http_request_t
r->headers_out.content_length_n = -1; r->headers_out.content_length_n = -1;
r->headers_out.status = NGX_HTTP_OK; r->headers_out.status = NGX_HTTP_OK;
ngx_http_discard_request_body(r);
r->discard_body = 1;
rc = ngx_http_send_header(r); rc = ngx_http_send_header(r);
if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
return rc; return rc;
......
...@@ -205,6 +205,7 @@ ngx_http_push_stream_publisher_body_handler(ngx_http_request_t *r) ...@@ -205,6 +205,7 @@ ngx_http_push_stream_publisher_body_handler(ngx_http_request_t *r)
ngx_http_push_stream_buffer_cleanup_timer_set(cf); ngx_http_push_stream_buffer_cleanup_timer_set(cf);
ngx_http_push_stream_send_response_channel_info(r, channel); ngx_http_push_stream_send_response_channel_info(r, channel);
ngx_http_finalize_request(r, NGX_HTTP_OK);
return; return;
} }
......
...@@ -95,8 +95,6 @@ ngx_http_push_stream_send_only_header_response(ngx_http_request_t *r, ngx_int_t ...@@ -95,8 +95,6 @@ ngx_http_push_stream_send_only_header_response(ngx_http_request_t *r, ngx_int_t
{ {
ngx_int_t rc; ngx_int_t rc;
ngx_http_discard_request_body(r);
r->discard_body = 1;
r->keepalive = 0; r->keepalive = 0;
r->header_only = 1; r->header_only = 1;
r->headers_out.content_length_n = 0; r->headers_out.content_length_n = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment