Skip to content

[ConnectionPool] Add support for https session cache #748

@JerryKwan

Description

@JerryKwan

Describe the bug
ConnectionPool works well for http requests, but fails for https request.

To Reproduce
Steps to reproduce the behavior:

  1. Run proxy.py as 'python -m proxy --num-workers 1 --log-level DEBUG --enable-conn-pool'
  2. Do 'curl -v -x localhost:8899 https://httpbin.org/get' to trigger error
  3. See error looks like this
# curl -v -x localhost:8899 https://httpbin.org/get
*   Trying ::1:8899...
* Connected to localhost (::1) port 8899 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to httpbin.org:443
> CONNECT httpbin.org:443 HTTP/1.1
> Host: httpbin.org:443
> User-Agent: curl/7.77.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection established
< 
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*  CAfile: none
*  CApath: none
* loaded libnssckbi.so
* NSS error -5938 (PR_END_OF_FILE_ERROR)
* Encountered end of file
* Closing connection 0
curl: (35) Encountered end of file

Expected behavior
ConnectionPool works well for http and https requests

Metadata

Metadata

Assignees

Labels

TaskTasks & chores related to proxy.py

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions