summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_spdy.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-15SPDY: send output queue after processing of read event.Valentin Bartenev1-0/+5
During the processing of input some control frames can be added to the queue. And if there were no writing streams at the moment, these control frames might be left unsent for a long time (or even forever). This long delay is especially critical for PING replies since a client can consider connection as broken and then resend exactly the same request over a new connection, which is not safe in case of non-idempotent HTTP methods.
2014-01-15SPDY: the SETTINGS frame should be allocated from sc->pool.Valentin Bartenev1-8/+5
There is no reason to allocate it from connection pool that more like just a bug especially since ngx_http_spdy_settings_frame_handler() already uses sc->pool to free a chain.
2014-01-15SPDY: fixed possible uninitialized memory access.Valentin Bartenev1-2/+2
The frame->stream pointer should always be initialized for control frames since the check against it can be performed in ngx_http_spdy_filter_cleanup().
2014-01-14SPDY: elimination of r->blocked counter usage for queuing frames.Valentin Bartenev1-6/+10
It was used to prevent destroying of request object when there are unsent frames in queue for the stream. Since it was incremented for each frame and is only 8 bits long, so it was not very hard to overflow the counter. Now the stream->queued counter is checked instead.
2014-01-14SPDY: better name for flag that indicates incomplete frame state.Valentin Bartenev1-4/+4
No functional changes.
2014-01-14SPDY: better name for queued frames counter.Valentin Bartenev1-3/+3
No functional changes.
2014-01-14SPDY: fixed format specifiers in logging.Valentin Bartenev1-6/+6
2013-12-26SPDY: fixed possible request hang.Valentin Bartenev1-4/+13
Processing events from upstream connection can result in sending queued frames from other streams. In this case such streams were not added to handling queue and properly handled. A global per connection flag was replaced by a per stream flag that indicates currently sending stream while all other streams can be added to handling queue.
2013-12-10SPDY: drop the "delayed" flag when finalizing connection.Valentin Bartenev1-0/+2
This flag in SPDY fake write events serves the same purposes as the "ready" flag in real events, and it must be dropped if request needs to be handled. Otherwise, it can prevent the request from finalization if ngx_http_writer() was set, which results in a connection leak. Found by Xiaochen Wang.
2013-10-01SPDY: set empty write handler during connection finalization.Valentin Bartenev1-0/+1
While ngx_http_spdy_write_handler() should not make any harm with current code, calling it during finalization of SPDY connection was not intended.
2013-10-01SPDY: fixed connection leak while waiting for request headers.Valentin Bartenev1-1/+19
If an error occurs in a SPDY connection, the c->error flag is set on every fake request connection, and its read or write event handler is called, in order to finalize it. But while waiting for request headers, it was a no-op since the read event handler had been set to ngx_http_empty_handler().
2013-10-01SPDY: fixed connection leak while waiting for request body.Valentin Bartenev1-0/+4
If an error occurs in a SPDY connection, the c->error flag is set on every fake request connection, and its read or write event handler is called, in order to finalize it. But while waiting for a request body, it was a no-op since the read event handler ngx_http_request_handler() calls r->read_event_handler that had been set to ngx_http_block_reading().
2013-08-15SPDY: alert about activated fake events instead of deleting them.Valentin Bartenev1-2/+4
They refer to the same socket descriptor as our real connection, and deleting them will stop processing of the connection. Events of fake connections must not be activated, and if it happened there is nothing we can do. The whole processing should be terminated as soon as possible, but it is not obvious how to do this safely.
2013-08-15SPDY: do not reject headers with empty value (ticket #396).Valentin Bartenev1-4/+0
A quote from SPDY draft 2 specification: "The length of each name and value must be greater than zero. A receiver of a zero-length name or value must send a RST_STREAM with code PROTOCOL error." But it appears that Chrome browser allows sending requests over SPDY/2 connection using JavaScript that contain headers with empty values. For better compatibility across SPDY clients and to be compliant with HTTP, such headers are no longer rejected. Also, it is worth noting that in SPDY draft 3 the statement has been changed so that it permits empty values for headers.
2013-08-15SPDY: fixed corruption of headers with names longer than 255.Valentin Bartenev1-2/+16
It is a bad idea to put zero byte in position where the length of the next header name can be stored before it was parsed.
2013-07-24SPDY: fixed segfault with "client_body_in_file_only" enabled.Valentin Bartenev1-9/+2
It is possible to send FLAG_FIN in additional empty data frame, even if it is known from the content-length header that request body is empty. And Firefox actually behaves like this (see ticket #357). To simplify code we sacrificed our microoptimization that did not work right due to missing check in the ngx_http_spdy_state_data() function for rb->buf set to NULL.
2013-05-23Use "void" for functions with empty parameter list.Sergey Kandaurov1-1/+1
2013-04-23SPDY: set NGX_TCP_NODELAY_DISABLED for fake connections.Valentin Bartenev1-0/+1
This is to avoid setting the TCP_NODELAY flag on SPDY socket in ngx_http_upstream_send_response(). The latter works per request, but in SPDY case it might affect other streams in connection.
2013-03-20Preliminary experimental support for SPDY draft 2.Valentin Bartenev1-0/+2881