Bug 62199

Summary: Make mod_proxy response header size configurable
Product: Apache httpd-2 Reporter: Hank Ibell <hwibell>
Component: mod_proxy_httpAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: FixedInTrunk, PatchAvailable
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.1   
Attachments: Proposed patch for trunk

Description Hank Ibell 2018-03-20 16:49:41 UTC
Users of mod_proxy may find that the 8K proxy response buffer is not sufficient to hold large headers. This enhancement allows the proxy response buffer to be configurable via the worker parameter 'ResponseFieldSize'.

A few bugs were opened for some weird behavior that was observed both before and after applying the patch:
 - https://bz.apache.org/bugzilla/show_bug.cgi?id=62196
 - https://bz.apache.org/bugzilla/show_bug.cgi?id=62197
 - https://bz.apache.org/bugzilla/show_bug.cgi?id=62198


Example usage:

# Allow proxy headers up to 10000 bytes instead of just 8KB.
<VirtualHost *:80>
  ProxyPass "/test" "http://localhost:8080" responsefieldsize=10000
  ProxyPassReverse "/test" "http://localhost:8080"
</VirtualHost>

Backend header size:
$ curl -sD - http://localhost:8080 -o /dev/null | grep X-Test-Header-1 | wc -c
    9020

Proxy header size:
$ curl -sD - http://localhost/test -o /dev/null | grep X-Test-Header-1 | wc -c
    9020
Comment 1 Hank Ibell 2018-03-20 16:50:36 UTC
Created attachment 35791 [details]
Proposed patch for trunk
Comment 2 Eric Covener 2018-04-11 19:16:17 UTC
committed in r1828926, sorting out if/how to reorganize the bit fields.