The HTTP request uses the same socket that was created for the HTTPS connection. #19006
Replies: 2 comments 2 replies
-
|
I can reproduce this, the command line: curl -vv https://eissing.org:443 http://eissing.org:443 --out-null --out-nullshows that the same connection is used for the second url. This is a bug. The reverse uses 2 connections, so we do not downgrade https: onto a http: connection at least: curl -vv http://eissing.org:80 https://eissing.org:80 --out-null --out-null |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Fixed merged in master |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m using libcurl’s multi-handle interface.
Here’s the situation:
• The first request is made to https://server:8080. This creates a new socket and keeps the connection alive.
• Then I make a second request to http://server:8080 (note: HTTP, not HTTPS). Surprisingly, this HTTP request reuses the same socket that was originally created for the HTTPS connection.
What I actually want is to maintain proper socket reuse behavior — meaning, for example:
• If I make a third request to https://server:8080, it should reuse the original HTTPS socket created by the first request.
So my question is:
👉 How can I ensure that each protocol (HTTP vs HTTPS) maintains its own persistent socket connection, and that subsequent HTTPS requests reuse only the HTTPS socket?
Beta Was this translation helpful? Give feedback.
All reactions