{"thread":{"id":"44217","subject":"[PATCH v2] http: http.emptyauth should allow empty (not just NULL) usernames","startedAt":"2016-10-04T14:54:04Z","lastAt":"2016-10-04T14:54:04Z","messageCount":1,"participants":["David Turner"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"303240","messageId":"1475592832-26545-1-git-send-email-dturner@twosigma.com","threadId":"44217","inReplyTo":null,"subject":"[PATCH v2] http: http.emptyauth should allow empty (not just NULL) usernames","fromName":"David Turner","fromEmail":"dturner@twosigma.com","sentAt":"2016-10-04T14:53:52Z","receivedAt":"2016-10-04T14:54:04Z","isPatch":true,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"When using Kerberos authentication with newer versions of libcurl,\nCURLOPT_USERPWD must be set to a value, even if it is an empty value.\nThe value is never sent to the server.  Previous versions of libcurl\ndid not require this variable to be set.  One way that some users\nexpress the empty username/password is http://:@gitserver.example.com,\nwhich http.emptyauth was designed to support.  Another, equivalent,\nURL is http://@gitserver.example.com.  The latter leads to a username\nof zero-length, rather than a NULL username, but CURLOPT_USERPWD still\nneeds to be set (if http.emptyauth is set).  Do so.\n\nSigned-off-by: David Turner <dturner@twosigma.com>\n---\nSame patch, different message.\n---\n http.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/http.c b/http.c\nindex 82ed542..bd0dba2 100644\n--- a/http.c\n+++ b/http.c\n@@ -351,7 +351,7 @@ static int http_options(const char *var, const char *value, void *cb)\n \n static void init_curl_http_auth(CURL *result)\n {\n-\tif (!http_auth.username) {\n+\tif (!http_auth.username || !*http_auth.username) {\n \t\tif (curl_empty_auth)\n \t\t\tcurl_easy_setopt(result, CURLOPT_USERPWD, \":\");\n \t\treturn;\n-- \n2.8.0.rc4.22.g8ae061a\n\n"}]}