[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 64/205: authneg: clear auth.multi flag at http_done
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 64/205: authneg: clear auth.multi flag at http_done |
Date: |
Thu, 20 Apr 2017 16:20:04 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit 5278462c32a70cd972a8cc824a38f164151d6c6d
Author: Isaac Boukris <address@hidden>
AuthorDate: Fri Jan 27 00:42:28 2017 +0200
authneg: clear auth.multi flag at http_done
This flag is meant for the current request based on authentication
state, once the request is done we can clear the flag.
Also change auth.multi to auth.multipass for better readability.
Fixes https://github.com/curl/curl/issues/1095
Closes https://github.com/curl/curl/pull/1326
Signed-off-by: Isaac Boukris <address@hidden>
Reported-by: Michael Kaufmann
---
lib/http.c | 11 ++++++++---
lib/urldata.h | 4 ++--
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/http.c b/lib/http.c
index fbb0376a3..ebc005060 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -645,10 +645,10 @@ output_auth_headers(struct connectdata *conn,
proxy ? "Proxy" : "Server", auth,
proxy ? (conn->http_proxy.user ? conn->http_proxy.user : "") :
(conn->user ? conn->user : ""));
- authstatus->multi = (!authstatus->done) ? TRUE : FALSE;
+ authstatus->multipass = (!authstatus->done) ? TRUE : FALSE;
}
else
- authstatus->multi = FALSE;
+ authstatus->multipass = FALSE;
return CURLE_OK;
}
@@ -1426,6 +1426,11 @@ CURLcode Curl_http_done(struct connectdata *conn,
struct Curl_easy *data = conn->data;
struct HTTP *http = data->req.protop;
+ /* Clear multipass flag. If authentication isn't done yet, then it will get
+ * a chance to be set back to true when we output the next auth header */
+ data->state.authhost.multipass = FALSE;
+ data->state.authproxy.multipass = FALSE;
+
Curl_unencode_cleanup(conn);
#ifdef USE_SPNEGO
@@ -1862,7 +1867,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
if(result)
return result;
- if((data->state.authhost.multi || data->state.authproxy.multi) &&
+ if((data->state.authhost.multipass || data->state.authproxy.multipass) &&
(httpreq != HTTPREQ_GET) &&
(httpreq != HTTPREQ_HEAD)) {
/* Auth is required and we are not authenticated yet. Make a PUT or POST
diff --git a/lib/urldata.h b/lib/urldata.h
index ef6a78846..7402332d1 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1283,8 +1283,8 @@ struct auth {
this resource */
bool done; /* TRUE when the auth phase is done and ready to do the *actual*
request */
- bool multi; /* TRUE if this is not yet authenticated but within the auth
- multipass negotiation */
+ bool multipass; /* TRUE if this is not yet authenticated but within the
+ auth multipass negotiation */
bool iestyle; /* TRUE if digest should be done IE-style or FALSE if it should
be RFC compliant */
};
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 118/205: http: Fix proxy connection reuse with basic-auth, (continued)
- [GNUnet-SVN] [gnurl] 118/205: http: Fix proxy connection reuse with basic-auth, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 108/205: asiohiper: make sure socket is open in event_cb, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 140/205: libcurl.def: removed, unused, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 182/205: openssl: fix this statement may fall through [-Wimplicit-fallthrough=], gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 48/205: insecure.d: clarify that this is for server connections, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 147/205: multi: make curl_multi_wait avoid malloc in the typical case, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 196/205: extern-scan.pl: strip trailing CR, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 174/205: vtls: fix unreferenced variable warnings, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 191/205: http2: fix handle leak in error path, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 24/205: fix some typos in the doc (#1306), gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 64/205: authneg: clear auth.multi flag at http_done,
gnunet <=
- [GNUnet-SVN] [gnurl] 104/205: tests/README: mention nroff for --manual tests, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 73/205: tests: clear the SSL_CERT_FILE variable on --libcurl tests, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 55/205: mkhelp: simplified the gzip code, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 102/205: travis: run tests-nonflaky instead of tests-full, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 77/205: winbuild: add basic support for OpenSSL 1.1.x, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 41/205: http2: Fix assertion error on redirect with CL=0, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 46/205: maketgz: Run updatemanpages.pl to update man pages, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 124/205: RELEASE-NOTES: synced with 556c51a2df, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 127/205: docs/Makefile.am: include CMakeLists.txt in the dist tarball, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 90/205: runtests.pl: fixed display of the Gopher IPv6 port number, gnunet, 2017/04/20