browserup / browserup-proxy

BrowserUp Proxy is a free utility to watch, test, and manipulate web application network traffic and performance.
https://browserup.com
Apache License 2.0
164 stars 41 forks source link

Response entity too large #301

Closed Gordiievskyi closed 4 years ago

Gordiievskyi commented 4 years ago

Describe the bug Сaught an exception on ProxyToServerConnection In standalone mode I got Response entity too large when enable filter:

[ERROR 2020-08-28T14:35:22,589 org.littleshoot.proxy.impl.ProxyToServerConnection] (LittleProxy-1-ProxyToServerWorker-1) (AWAITING_INITIAL) [id: 0xe5489a53, L:0.0.0.0/0.0.0.0:61924 ! R:www.wsj.com/13.32.202.98:443]: Caught an exception on ProxyToServerConnection io.netty.handler.codec.TooLongFrameException: Response entity too large: HttpObjectAggregator$AggregatedFullHttpResponse

I see there is same issue for browsermob and comment from @ericbeland with link here https://github.com/browserup/browserup-proxy/issues/77. But workaroun there is for embedded mode.

To Reproduce Steps to reproduce the behavior:

  1. Create proxy server on some port, in my case 8080: ./browserup-proxy-2.0.1/bin/browserup-proxy -port 8080
  2. Create new proxy curl --location --request POST '0.0.0.0:8080/proxy?trustAllServers=true&port=8081'
  3. Add response filter - curl --location --request POST '0.0.0.0:8080/proxy/8081/filter/response' \ --header 'Content-Type: text/plain' \ --data-raw 'response'
  4. Start trace the traffic : curl --location --request PUT '0.0.0.0:8080/proxy/8081/har?captureHeaders=true&captureCookies=true&captureContent=true&captureBinaryContent=true&initialPageRef=MyPage%20112&initialPageTitle=My%20Page' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-raw ''
  5. Use user agent of your choice, in my case chrome, configure it to use created proxy( either throught system proxy or with args if user agent support it, chrome supports it so I will rpovide here command for OSX) open -a "Google Chrome" --args --proxy-server="http://0.0.0.0:8081" --profile-directory=Default5 Also one can use postman and set in setting to use created proxy
  6. Open this web page https://www.wsj.com/ or curl --location --request GET 'https://wsj.com'

Actual result: page is not loaded and in proxy console there is and exception that I put in description:

Expected behavior Page is loaded same way as without this empty response filter, no exception happen, at least option to set size in standalone mode.

Please complete the following information:

ericbeland commented 4 years ago

If this is an issue after the next version lands, please reopen. The issue will most likely go away as we replace the proxy dependency.