Commit 234270f1 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

adjusting to work with the version nginx 0.8.53

parent 203c5751
...@@ -295,6 +295,7 @@ ngx_http_push_stream_disconnect_worker_subscribers(ngx_flag_t force_disconnect) ...@@ -295,6 +295,7 @@ ngx_http_push_stream_disconnect_worker_subscribers(ngx_flag_t force_disconnect)
if (r != NULL) { if (r != NULL) {
if ((force_disconnect == 1) || ((cur->expires != 0) && (now > cur->expires))) { if ((force_disconnect == 1) || ((cur->expires != 0) && (now > cur->expires))) {
ngx_http_push_stream_worker_subscriber_cleanup_locked(cur); ngx_http_push_stream_worker_subscriber_cleanup_locked(cur);
r->keepalive = 0;
ngx_http_finalize_request(r, NGX_HTTP_OK); ngx_http_finalize_request(r, NGX_HTTP_OK);
} else { } else {
break; break;
......
...@@ -266,12 +266,6 @@ ngx_http_push_stream_subscriber_handler(ngx_http_request_t *r) ...@@ -266,12 +266,6 @@ ngx_http_push_stream_subscriber_handler(ngx_http_request_t *r)
r->read_event_handler = ngx_http_test_reading; r->read_event_handler = ngx_http_test_reading;
r->write_event_handler = ngx_http_request_empty_handler; r->write_event_handler = ngx_http_request_empty_handler;
r->discard_body = 1; r->discard_body = 1;
#if defined nginx_version && nginx_version >= 8053
r->keepalive = 1;
#else
r->keepalive = 0;
#endif
r->headers_out.content_type = cf->content_type; r->headers_out.content_type = cf->content_type;
r->headers_out.status = NGX_HTTP_OK; r->headers_out.status = NGX_HTTP_OK;
...@@ -281,6 +275,11 @@ ngx_http_push_stream_subscriber_handler(ngx_http_request_t *r) ...@@ -281,6 +275,11 @@ ngx_http_push_stream_subscriber_handler(ngx_http_request_t *r)
ngx_http_push_stream_worker_data_t *thisworker_data = workers_data + ngx_process_slot; ngx_http_push_stream_worker_data_t *thisworker_data = workers_data + ngx_process_slot;
ngx_http_send_header(r); ngx_http_send_header(r);
#if defined nginx_version && nginx_version >= 8053
r->keepalive = 1;
#else
r->keepalive = 0;
#endif
ngx_http_push_stream_send_body_header(r, cf); ngx_http_push_stream_send_body_header(r, cf);
ngx_shmtx_lock(&shpool->mutex); ngx_shmtx_lock(&shpool->mutex);
......
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