Using Compression with Little proxy

105 views
Skip to first unread message

dines...@gmail.com

unread,
Dec 5, 2016, 1:22:56 PM12/5/16
to LittleProxy
Hi,

My issue is related to compression and what I'm trying to achieve is following. I need to compress the content between client and the littleproxy but not between littleproxy and back end server.
Client <----compressed----> Littleproxy <----uncompressed----> Host

I have tried by adding deflate and inflate handlers in both clientToProxyRequest and proxyToClientResponse but it didn't work. Also implemented get maximum buffer size in bytes methods to return a large value.

When I add the deflate handlers, server doesn't respond to browser even server receive the response from the host.  Following are some log entries.

-----------------------------------------------------------

2016-12-05 16:28:37,396 localhost 6.5.49 DEBUG [default-ProxyToServerWorker-1] org.littleshoot.proxy.impl.ClientToProxyConnection (AWAITING_INITIAL) [id: 0x1e5d9458, /127.0.0.1:40126 => /127.0.0.1:8181]: Wrote: HttpObjectAggregator$AggregatedFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: CompositeByteBuf(ridx: 0, widx: 11197, cap: 11197, components=13))
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Date: Mon, 05 Dec 2016 16:28:37 GMT
Content-Length: 11197
Via: 1.1 172.25.16.140
2016-12-05 16:28:37,396 localhost 6.5.49 DEBUG [default-ProxyToServerWorker-1] org.littleshoot.proxy.impl.ClientToProxyConnection (AWAITING_INITIAL) [id: 0x1e5d9458, /127.0.0.1:40126 => /127.0.0.1:8181]: Retaining reference counted message
2016-12-05 16:28:37,396 localhost 6.5.49 DEBUG [default-ProxyToServerWorker-1] org.littleshoot.proxy.impl.ClientToProxyConnection (AWAITING_INITIAL) [id: 0x1e5d9458, /127.0.0.1:40126 => /127.0.0.1:8181]: Writing: EmptyByteBufBE
2016-12-05 16:28:37,396 localhost 6.5.49 DEBUG [default-ProxyToServerWorker-1] org.littleshoot.proxy.impl.ClientToProxyConnection (AWAITING_INITIAL) [id: 0x1e5d9458, /127.0.0.1:40126 => /127.0.0.1:8181]: Wrote: EmptyByteBufBE
2016-12-05 16:28:37,396 localhost 6.5.49 DEBUG [default-ProxyToServerWorker-1] org.littleshoot.proxy.impl.ClientToProxyConnection (AWAITING_INITIAL) [id: 0x1e5d9458, /127.0.0.1:40126 => /127.0.0.1:8181]: Handling last chunk. Using normal server connection closing rules.
2016-12-05 16:28:37,396 localhost 6.5.49 DEBUG [default-ProxyToServerWorker-1] org.littleshoot.proxy.impl.ClientToProxyConnection (AWAITING_INITIAL) [id: 0x1e5d9458, /127.0.0.1:40126 => /127.0.0.1:8181]: Not closing server connection for response: DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Date: Mon, 05 Dec 2016 16:28:37 GMT
Content-Length: 11197
2016-12-05 16:28:37,396 localhost 6.5.49 DEBUG [default-ProxyToServerWorker-1] org.littleshoot.proxy.impl.ClientToProxyConnection (AWAITING_INITIAL) [id: 0x1e5d9458, /127.0.0.1:40126 => /127.0.0.1:8181]: Handling last chunk. Using normal client connection closing rules.

-----------------------------------------------------------

Sorry if this is a duplicate post, I tried to find a solutions but no luck. Please shed some lights to resolve this issue.

Thanks,
Dinesh


Reply all
Reply to author
Forward
0 new messages