| 603 | } |
| 604 | |
| 605 | static int curl_empty_auth_enabled(void) |
| 606 | { |
| 607 | if (curl_empty_auth >= 0) |
| 608 | return curl_empty_auth; |
| 609 | |
| 610 | /* |
| 611 | * In the automatic case, kick in the empty-auth |
| 612 | * hack as long as we would potentially try some |
| 613 | * method more exotic than "Basic" or "Digest". |
| 614 | * |
| 615 | * But only do this when this is our second or |
| 616 | * subsequent request, as by then we know what |
| 617 | * methods are available. |
| 618 | */ |
| 619 | if (http_auth_methods_restricted && |
| 620 | (http_auth_methods & ~empty_auth_useless)) |
| 621 | return 1; |
| 622 | return 0; |
| 623 | } |
| 624 | |
| 625 | struct curl_slist *http_append_auth_header(const struct credential *c, |
| 626 | struct curl_slist *headers) |
no outgoing calls
no test coverage detected