haproxy/include/common
Willy Tarreau 6c71e4696b BUG/MAJOR: hpack: don't pretend large headers fit in empty table
In hpack_dht_make_room(), we try to fulfill this rule form RFC7541#4.4 :

 "It is not an error to attempt to add an entry that is larger than the
  maximum size; an attempt to add an entry larger than the maximum size
  causes the table to be emptied of all existing entries and results in
  an empty table."

Unfortunately it is not consistent with the way it's used in
hpack_dht_insert() as this last one will consider a success as a
confirmation it can copy the header into the table, and a failure as
an indexing error. This results in the two following issues :
  - if a client sends too large a header into an empty table, this
    header may overflow the table. Fortunately, most clients send
    small headers like :authority first, and never mark headers that
    don't fit into the table as indexable since it is counter-productive ;

  - if a client sends too large a header into a populated table, the
    operation fails after the table is totally flushed and the request
    is not processed.

This patch fixes the two issues at once :
  - a header not fitting into an empty table is always a sign that it
    will never fit ;
  - not fitting into the table is not an error

Thanks to Yves Lafon for reporting detailed traces demonstrating this
issue. This fix must be backported to 1.8.
2017-12-04 18:06:51 +01:00
..
accept4.h
base64.h
buffer.h BUG/MINOR: threads: don't drop "extern" on the lock in include files 2017-11-26 11:10:50 +01:00
cfgparse.h CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
chunk.h CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
compat.h BUILD: tcp: define SOL_TCP when only IPPROTO_TCP exists 2016-08-10 21:11:38 +02:00
compiler.h BUILD: compiler: add a new type modifier __maybe_unused 2017-11-20 21:27:27 +01:00
config.h MINOR: threads: Add THREAD_LOCAL macro 2017-10-31 11:36:13 +01:00
debug.h MINOR: debug: enable memory poisonning to use byte 0 2015-10-08 14:12:13 +02:00
defaults.h MINOR: log: Add logurilen tunable. 2017-06-02 11:06:36 +02:00
epoll.h
errors.h
h2.h MEDIUM: h2: add a function to emit an HTTP/1 request from a headers list 2017-11-21 21:13:33 +01:00
hash.h
hathreads.h BUG/MINOR: threads: tid_bit must be a unsigned long 2017-11-14 18:11:28 +01:00
hpack-dec.h MEDIUM: h2: change hpack_decode_headers() to only provide a list of headers 2017-11-21 21:13:36 +01:00
hpack-enc.h MEDIUM: hpack: implement basic hpack encoding 2017-10-31 18:03:24 +01:00
hpack-huff.h MINOR: hpack: implement the HPACK Huffman table decoder 2017-10-31 18:03:24 +01:00
hpack-tbl.h BUG/MAJOR: hpack: don't pretend large headers fit in empty table 2017-12-04 18:06:51 +01:00
http-hdr.h MINOR: http: add very simple header management based on double strings 2017-10-22 09:54:14 +02:00
ist.h MINOR: ist: add ist0() to add a trailing zero to a string. 2017-10-19 15:01:08 +02:00
memory.h CLEANUP: pools: align pools on a cache line 2017-11-26 11:10:53 +01:00
mini-clist.h MEDIUM: lists: list_for_each_entry{_safe}_from functions 2017-10-31 03:44:11 +01:00
namespace.h
net_helper.h MINOR: net_helper: add 64-bit read/write functions 2017-09-21 06:27:08 +02:00
rbtree.h
regex.h MINOR: threads/regex: Change Regex trash buffer into a thread local variable 2017-10-31 13:58:31 +01:00
splice.h
standard.h MINOR: standard: Add my_ffsl function to get the position of the bit set to one 2017-11-24 15:38:49 +01:00
syscall.h BUILD: enable build on Linux/s390x 2015-10-12 20:58:51 +02:00
template.h
ticks.h
time.h MEDIUM: threads/time: Many global variables from time.h are now thread-local 2017-10-31 13:58:30 +01:00
tools.h
uri_auth.h MINOR: stats: add ST_SHOWADMIN to pass the admin info in the regular flags 2016-03-11 17:08:05 +01:00
version.h [RELEASE] Released version 1.9-dev0 2017-11-26 19:50:17 +01:00
xref.h MEDIUM: threads/xref: Convert xref function to a thread safe model 2017-10-31 13:58:32 +01:00