-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
This is not a issue, but discussion.
lhttpc_client.erl uses {Host, Port, Ssl} tuple for lookup keep-alive sockets in lhttpc_manager.erl
So:
- client connects to server {Host, Port, Ssl}
- server returns response and keep connection alive
- lhttpc keep open socket on lhttpc_manager under {Host, Port, Ssl} key
- client makes one more request to that host {Host, Port, Ssl} and can reuse this socket
But in case when proxy enabled, there is one more component that involved in the process:
- client connects to sever {Host, Port, Ssl} through proxy-server {PHost, PPort, PSsl}, by specifying
proxyoption - server returns response and may keep connection alive; proxy keep connection with client alive
- lhttpc keep open socket (connected to proxy-server {PHost, PPort, PSsl}) under key {Host, Port, Ssl} !!!
- client makes one more connection to that host {Host, Port, Ssl}, but provide OTHER
proxyoption. Butlhttpc_managerreturn cached connection to proxy-server {PHost, PPort, PSsl}
My suggestion: include proxy option in the cache key, eg host {Host, Port, Ssl, ProxyUrl}
Metadata
Metadata
Assignees
Labels
No labels