Search code examples
little-proxy

HTTP content length exceeded 4194304 bytes


While testing I observed that media attachments more than 4194304 bytes are rejected by the proxy. It throws the message - "HTTP content length exceeded 4194304 bytes".

Is this the functionality of LittleProxy implementation or there is any configuration which will allow bigger size of attachments than this?


Solution

  • This sounds like a TooLongFrameException thrown by HttpObjectAggregator.

    The only way that I think this could happen is when using an HttpFiltersSource that specifies a non-zero value from getMaximumRequestBufferSizeInBytes() or getMaximumResponseBufferSizeInBytes(). You can increase those, but that increases your memory usage. If the filter can be rewritten so as to work with frames (chunks) as they stream through, then you can set the buffer size to 0 and dramatically reduce your memory consumption.