Rollback SPDY module and SSL config (TLSv1, TLSv1.1)
This commit is contained in:
@@ -323,6 +323,11 @@ ngx_http_init_connection(ngx_connection_t *c)
|
||||
rev->handler = ngx_http_wait_request_handler;
|
||||
c->write->handler = ngx_http_empty_handler;
|
||||
|
||||
#if (NGX_HTTP_SPDY)
|
||||
if (hc->addr_conf->spdy) {
|
||||
rev->handler = ngx_http_spdy_init;
|
||||
}
|
||||
#endif
|
||||
#if (NGX_HTTP_V2)
|
||||
if (hc->addr_conf->http2) {
|
||||
rev->handler = ngx_http_v2_init;
|
||||
@@ -814,6 +819,34 @@ ngx_http_ssl_handshake_handler(ngx_connection_t *c)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (NGX_HTTP_SPDY \
|
||||
&& (defined TLSEXT_TYPE_application_layer_protocol_negotiation \
|
||||
|| defined TLSEXT_TYPE_next_proto_neg))
|
||||
{
|
||||
unsigned int len;
|
||||
const unsigned char *data;
|
||||
static const ngx_str_t spdy = ngx_string(NGX_SPDY_NPN_NEGOTIATED);
|
||||
|
||||
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
|
||||
SSL_get0_alpn_selected(c->ssl->connection, &data, &len);
|
||||
|
||||
#ifdef TLSEXT_TYPE_next_proto_neg
|
||||
if (len == 0) {
|
||||
SSL_get0_next_proto_negotiated(c->ssl->connection, &data, &len);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* TLSEXT_TYPE_next_proto_neg */
|
||||
SSL_get0_next_proto_negotiated(c->ssl->connection, &data, &len);
|
||||
#endif
|
||||
|
||||
if (len == spdy.len && ngx_strncmp(data, spdy.data, spdy.len) == 0) {
|
||||
ngx_http_spdy_init(c->read);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
c->log->action = "waiting for request";
|
||||
|
||||
c->read->handler = ngx_http_wait_request_handler;
|
||||
@@ -2575,6 +2608,12 @@ ngx_http_finalize_connection(ngx_http_request_t *r)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if (NGX_HTTP_SPDY)
|
||||
if (r->spdy_stream) {
|
||||
ngx_http_close_request(r, 0);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
|
||||
|
||||
@@ -2783,6 +2822,18 @@ ngx_http_test_reading(ngx_http_request_t *r)
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
#if (NGX_HTTP_SPDY)
|
||||
|
||||
if (r->spdy_stream) {
|
||||
if (c->error) {
|
||||
err = 0;
|
||||
goto closed;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if (NGX_HAVE_KQUEUE)
|
||||
@@ -3447,6 +3498,12 @@ ngx_http_close_request(ngx_http_request_t *r, ngx_int_t rc)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if (NGX_HTTP_SPDY)
|
||||
if (r->spdy_stream) {
|
||||
ngx_http_spdy_close_stream(r->spdy_stream, rc);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
ngx_http_free_request(r, rc);
|
||||
ngx_http_close_connection(c);
|
||||
|
||||
Reference in New Issue
Block a user