How to Increase Proxy Header Size

Hello,

I'm testing out my application UI, and I'm routing the request through a proxy in my Virtualize server. The header of my request is over 8 KB (it's around 9 KB), and I've noticed that proxies do not allow their headers to be more than 8 KB.

I tried two things to try and solve this problem I have:
1) I added HTTP listeners to my proxy. I created and placed a 'embeddedServer.properties' with the following property inside it: embedded.connector.maxHttpHeaderSize=9500. I followed instructions from this doc: https://docs.parasoft.com/display/SOAVIRT9107CTP313/HTTP+Configuration#HTTPConfiguration-AdditionalHTTPMessageProxyConfiguration. This did not work.

2) I increased the header size limit or the built-in Tomcat by editing the server.xml in C:\Program Files\Parasoft\SOAtest & Virtualize\9.10\eclipse\plugins\com.parasoft.xtest.libs.web_9.10.0.20161130\root\tomcat\conf. I followed instructions from this doc: https://help.sap.com/doc/saphelpiis_sbo41_sp6_bip_admin_en/4.1/en-US/frameset.htm?46838ea06e041014910aba7db0e91070.html. This worked but it only increased the header size limit for one port (9080).

I'd like to get 1) to work, since I don't want to be constrained to just one port.

Thank you in advance for any advice.

Comments

  • williammccuskerwilliammccusker Posts: 238 ✭✭

    Hi,
    When added the property to the embeddedServer.properties in the VirtualAssets project did you restart the proxy?

  • amurphy147amurphy147 Posts: 18

    Yes, after adding 'embeddedServer.properties' inside my VirtualAssets project folder, I disabled and re-enabled my proxy. It didn't help. I also tried to stop and restart my Virtualize Server, as well as just close and reopen the SOAVirt application. None of which helped in getting Virtualize to recognize the 'embeddedServer.properties' inside my VirtualAssets folder.

    Here is what is inside embeddedServer.properties:

  • williammccuskerwilliammccusker Posts: 238 ✭✭

    Hi,

    I am not able to reproduce the issue you are seeing. When I put the properties file in the VirtualAssets project I am able to control the max size of the header (smaller or bigger) and in testing I can set it to accept values larger than 9k.

    Could you contact [email protected] so that someone can help you more directly?

  • amurphy147amurphy147 Posts: 18

    Hello William,

    Thank you for your reply. I've gotten it to work now. It turned out that the service I was sending the request to was rejecting the request because the header was actually too big. Once the developer fixed the service so that it allowed itself to receive the header, I was able to get a successful response. Turns out I was already able to increase the header size.

    Best,
    A. Murphy

  • williammccuskerwilliammccusker Posts: 238 ✭✭

    Great news! Thanks for updating us :)

  • goofy78270goofy78270 Posts: 64

    I would be careful with header sizes as 8k is pretty big. Make sure systems can handle them as some web servers have limits set at 8k.

    Some additional info (a little outdated, but good reference point):
    here is apache - http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize
    here is iis - https://support.microsoft.com/en-us/help/310156/how-to-limit-the-header-size-of-the-http-transmission-that-iis-accepts

  • amurphy147amurphy147 Posts: 18

    Hi @williammccusker ,

    Just had a quick question: Is there a limit as to how high one can increase the proxy header size using the maxHeader option in embeddedServer.properties file?

    Best,
    A. Murphy

  • williammccuskerwilliammccusker Posts: 238 ✭✭

    Hi,

    I am not aware of a limit, the property just sets the max size in bytes so it may support arbitrarily large values. Certain the 8k or 9k values discussed are fine. What kind of max size were you thinking to set?

Sign In or Register to comment.