mirror of
https://github.com/curl/curl.git
synced 2026-05-30 10:17:28 +03:00
parent
502b6a5a32
commit
6efb6b1e77
1 changed files with 8 additions and 1 deletions
|
|
@ -3715,7 +3715,14 @@ CURLcode Curl_http_header(struct Curl_easy *data, struct connectdata *conn,
|
|||
#ifndef CURL_DISABLE_HSTS
|
||||
/* If enabled, the header is incoming and this is over HTTPS */
|
||||
else if(data->hsts && checkprefix("Strict-Transport-Security:", headp) &&
|
||||
(conn->handler->flags & PROTOPT_SSL)) {
|
||||
((conn->handler->flags & PROTOPT_SSL) ||
|
||||
#ifdef CURLDEBUG
|
||||
/* allow debug builds to circumvent the HTTPS restriction */
|
||||
getenv("CURL_HSTS_HTTP")
|
||||
#else
|
||||
0
|
||||
#endif
|
||||
)) {
|
||||
CURLcode check =
|
||||
Curl_hsts_parse(data->hsts, data->state.up.hostname,
|
||||
headp + strlen("Strict-Transport-Security:"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue