Bug 62199 - Make mod_proxy response header size configurable
Summary: Make mod_proxy response header size configurable
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_http (show other bugs)
Version: 2.5-HEAD
Hardware: PC Mac OS X 10.1
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: FixedInTrunk, PatchAvailable
Depends on:
Reported: 2018-03-20 16:49 UTC by Hank Ibell
Modified: 2018-04-11 19:16 UTC (History)
0 users

Proposed patch for trunk (7.94 KB, patch)
2018-03-20 16:50 UTC, Hank Ibell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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"

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

Proxy header size:
$ curl -sD - http://localhost/test -o /dev/null | grep X-Test-Header-1 | wc -c
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.