On Thu, Feb 11, 2016 at 4:42 PM, Ruediger Pluem <rpl...@apache.org> wrote: > > In general this looks fine. We only run in trouble if something provided in > the Host header is longer then > PROXY_WORKER_MAX_HOSTNAME_SIZE (in case of ProxyPreserveHost on). Then we > loose the SNI hostname on these requests. > Probably never happens, but could be fun to debug if it happens :-). > So probably HUGE_STRING_LEN would be better, but a huge waste of stack > resources in most cases for sure.
It seems that RFC1035 limits host/DNS names to 255/253 (not clear if it's for each or both when the host name is dotted with the domain name), so I choose 512 (should be enough in any case including the trailing \0) as the limit in r1732986... Backport proposed in r1732988. Thanks for the review, Yann.