curl-library
Behaviour with CURLOPT_FRESH_CONNECT when libcurl performs a request internally
Date: Thu, 29 Nov 2018 18:11:08 +0000
Hello,
curl version: v7_57_0
I'm working on a piece of software which works in two modes:
- normal mode where we are re-using existing connections
- degraded mode where CURLOPT_FRESH_CONNECT is enabled on every HTTP
request
The degraded mode is activated after a transfer fails due to a stale
connection (I've noticed this can happen because e.g. the server terminated
a connection but for some reason we didn't receive the FIN packet).
I'm having an issue in this mode when the server responds with "HTTP/1.1
401 Unauthorized" to a GET request I just performed. In that case, libcurl
is internally performing an HTTP request to send the authorization; and
that request is made using an already existing connection somehow ignoring
the FRESH_CONNECT option I passed to the original request.
Is there a way I could force libcurl to open a new connection also when it
performs a request internally (generally or at least when handling 401)?
Thanks,
John
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-11-29