<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http, branch release-1.5.9</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Upstream: reading from a client after connection upgrade.</title>
<updated>2014-01-22T12:05:07+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2014-01-22T12:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=c74e23ba3af8d9d8da048cb40bb7d77ab0143a94'/>
<id>c74e23ba3af8d9d8da048cb40bb7d77ab0143a94</id>
<content type='text'>
Read event on a client connection might have been disabled during
previous processing, and we at least need to handle events.  Calling
ngx_http_upstream_process_upgraded() is a simpliest way to do it.

Notably this change is needed for select, poll and /dev/poll event
methods.

Previous version of this patch was posted here:
http://mailman.nginx.org/pipermail/nginx/2014-January/041839.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Read event on a client connection might have been disabled during
previous processing, and we at least need to handle events.  Calling
ngx_http_upstream_process_upgraded() is a simpliest way to do it.

Notably this change is needed for select, poll and /dev/poll event
methods.

Previous version of this patch was posted here:
http://mailman.nginx.org/pipermail/nginx/2014-January/041839.html
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: use ngx_queue_t to queue streams for post processing.</title>
<updated>2014-01-20T16:56:49+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-20T16:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=abcbe5421990ddfd8ff87bd905bdc62c5675a6c8'/>
<id>abcbe5421990ddfd8ff87bd905bdc62c5675a6c8</id>
<content type='text'>
It simplifies the code and allows easy reuse the same queue pointer to store
streams in various queues with different requirements.  Future implementation
of SPDY/3.1 will take advantage of this quality.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It simplifies the code and allows easy reuse the same queue pointer to store
streams in various queues with different requirements.  Future implementation
of SPDY/3.1 will take advantage of this quality.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: store the length of frame instead of its whole size.</title>
<updated>2014-01-22T00:58:19+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-22T00:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=3ddf9ccfce12454dfa456d3ef5c92f7472966ebf'/>
<id>3ddf9ccfce12454dfa456d3ef5c92f7472966ebf</id>
<content type='text'>
The "length" value better corresponds with the specification and reduces
confusion about whether frame's header is included in "size" or not.

Also this change simplifies some parts of code, since in more cases the
length of frame is more useful than its actual size, especially considering
that the size of frame header is constant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "length" value better corresponds with the specification and reduces
confusion about whether frame's header is included in "size" or not.

Also this change simplifies some parts of code, since in more cases the
length of frame is more useful than its actual size, especially considering
that the size of frame header is constant.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: use frame-&gt;next pointer to chain free frames.</title>
<updated>2014-01-22T00:58:19+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-22T00:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e62156d8292eb288ad456d6ba1eb96db7ce2a6b6'/>
<id>e62156d8292eb288ad456d6ba1eb96db7ce2a6b6</id>
<content type='text'>
There is no need in separate "free" pointer and like it is for ngx_chain_t
the "next" pointer can be used.  But after this change successfully handled
frame should not be accessed, so the frame handling cycle was improved to
store pointer to the next frame before processing.

Also worth noting that initializing "free" pointer to NULL in the original
code was surplus.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no need in separate "free" pointer and like it is for ngx_chain_t
the "next" pointer can be used.  But after this change successfully handled
frame should not be accessed, so the frame handling cycle was improved to
store pointer to the next frame before processing.

Also worth noting that initializing "free" pointer to NULL in the original
code was surplus.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: proper handling of all RST_STREAM statuses.</title>
<updated>2014-01-22T00:58:19+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-22T00:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=650984cd20fe526a6eef0c014fbd92a06aeb1f7a'/>
<id>650984cd20fe526a6eef0c014fbd92a06aeb1f7a</id>
<content type='text'>
Previously, only stream CANCEL and INTERNAL_ERROR were handled right.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, only stream CANCEL and INTERNAL_ERROR were handled right.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: removed state to check first SETTINGS frame.</title>
<updated>2014-01-22T00:58:19+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-22T00:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=d055f74178092aee511236f74192ed9ec2a7c893'/>
<id>d055f74178092aee511236f74192ed9ec2a7c893</id>
<content type='text'>
That code was based on misunderstanding of spdy specification about
configuration applicability in the SETTINGS frames.  The original
interpretation was that configuration is assigned for the whole
SPDY connection, while it is only for the endpoint.

Moreover, the strange thing is that specification forbids multiple
entries in the SETTINGS frame with the same ID even if flags are
different.  As a result, Chrome sends two SETTINGS frames: one with
its own configuration, and another one with configuration stored
for a server (when the FLAG_SETTINGS_PERSIST_VALUE flags were used
by the server).

To simplify implementation we refuse to use the persistent settings
feature and thereby avoid all the complexity related with its proper
support.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That code was based on misunderstanding of spdy specification about
configuration applicability in the SETTINGS frames.  The original
interpretation was that configuration is assigned for the whole
SPDY connection, while it is only for the endpoint.

Moreover, the strange thing is that specification forbids multiple
entries in the SETTINGS frame with the same ID even if flags are
different.  As a result, Chrome sends two SETTINGS frames: one with
its own configuration, and another one with configuration stored
for a server (when the FLAG_SETTINGS_PERSIST_VALUE flags were used
by the server).

To simplify implementation we refuse to use the persistent settings
feature and thereby avoid all the complexity related with its proper
support.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: better name for frame entries counter.</title>
<updated>2014-01-22T00:58:19+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-22T00:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=406c0613f50c93a8759b54f9cfcf9443b429f51b'/>
<id>406c0613f50c93a8759b54f9cfcf9443b429f51b</id>
<content type='text'>
The "headers" is not a good term, since it is used not only to count
name/value pairs in the HEADERS block but to count SETTINGS entries too.

Moreover, one name/value pair in HEADERS can contain multiple http headers
with the same name.

No functional changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "headers" is not a good term, since it is used not only to count
name/value pairs in the HEADERS block but to count SETTINGS entries too.

Moreover, one name/value pair in HEADERS can contain multiple http headers
with the same name.

No functional changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: fixed possible segfault.</title>
<updated>2014-01-22T00:58:19+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-22T00:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=32bb39c48fd8f9d1481353adb5e428a6097f7ee9'/>
<id>32bb39c48fd8f9d1481353adb5e428a6097f7ee9</id>
<content type='text'>
While processing a DATA frame, the link to related stream is stored in spdy
connection object as part of connection state.  But this stream can be closed
between receiving parts of the frame.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While processing a DATA frame, the link to related stream is stored in spdy
connection object as part of connection state.  But this stream can be closed
between receiving parts of the frame.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: send output queue after processing of read event.</title>
<updated>2014-01-15T13:16:38+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-15T13:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=1ef5553644e9becd61ac7a6e5d3a673374b947a5'/>
<id>1ef5553644e9becd61ac7a6e5d3a673374b947a5</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDY: the SETTINGS frame should be allocated from sc-&gt;pool.</title>
<updated>2014-01-15T13:16:38+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2014-01-15T13:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=82a1ff31f9ff38ef2fabdff7857fe0fc974e8a8b'/>
<id>82a1ff31f9ff38ef2fabdff7857fe0fc974e8a8b</id>
<content type='text'>
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-&gt;pool to free a chain.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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-&gt;pool to free a chain.
</pre>
</div>
</content>
</entry>
</feed>
