On 15 July 2014 14:13, Roberto Peon <grmocg@gmail.com> wrote:
> Note that there the spec says to copy, but a smart implementation needs
> not actually do that. It is an accounting trick.
Yes I understand reference counting!
As previously discussed, I'm not concerned about the actual copy of the
strings of the header. I'm concerned that by copying a static entry into
the header table you have to evict another entry. This makes
inefficient use of the header table allowance as it can contain many (and
duplicate) copies of static entries. The resulting churn in the header
table will mean that all entries will need to be periodically resent.
Note also that on an aggregate connection this copy can be used as part of
a DoS, as a request could contain many and duplicated static indexes, which
will cause the header table to be flushed and all shared connections to
have to resend fields.
It is also needless complexity for the encoder, which should just be able
to know the index of :status:200 and drop that byte into the buffer.
Instead it now has to do a lookup to see if and where the :status:200 field
is in the dynamic table and use that index.
I know it is not all that difficult to implement, but the only reason given
for this copy was to limit the size of the reference set. If there is no
reference set, then the copy has no purpose what so ever and it has some
cost. We can't seriously be proposing to leave it in there as some kind
of legacy kludge?
regards
--
Greg Wilkins <gregw@intalio.com>
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com advice and support for jetty and cometd.