aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2014-07-21 22:08:49 +0000
committerPeter Wemm <peter@FreeBSD.org>2014-07-21 22:08:49 +0000
commitb42ed207213a85ee3a7aa59fdb3d32627c2aadea (patch)
treecb520e2bdb7611a546a2ef1001c4ec7dbfe45ee6
parent08a60c7e0c84f2e87393c45f74ebca226b7d0fdb (diff)
downloadsrc-b42ed207213a85ee3a7aa59fdb3d32627c2aadea.tar.gz
src-b42ed207213a85ee3a7aa59fdb3d32627c2aadea.zip
Vendor import serf-1.3.6vendor/serf/serf-1.3.6
+ Revert r2319 from serf 1.3.5: this change was making serf call handle_response + multiple times in case of an error response, leading to unexpected behavior.
Notes
Notes: svn path=/vendor/serf/dist/; revision=268958 svn path=/vendor/serf/serf-1.3.6/; revision=268959; tag=vendor/serf/serf-1.3.6
-rw-r--r--CHANGES4
-rw-r--r--auth/auth.c1
-rw-r--r--outgoing.c31
-rw-r--r--serf.h2
4 files changed, 20 insertions, 18 deletions
diff --git a/CHANGES b/CHANGES
index 64eaaa3b5582..441eb1edf630 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+Serf 1.3.6 [2014-06-09, from /tags/1.3.6, rxxxx]
+ Revert r2319 from serf 1.3.5: this change was making serf call handle_response
+ multiple times in case of an error response, leading to unexpected behavior.
+
Serf 1.3.5 [2014-04-27, from /tags/1.3.5, rxxxx]
Fix issue #125: no reverse lookup during Negotiate authentication for proxies.
Fix a crash caused by incorrect reuse of the ssltunnel CONNECT request (r2316)
diff --git a/auth/auth.c b/auth/auth.c
index 811709122a8c..6ba3ba5ab59e 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -408,7 +408,6 @@ apr_status_t serf__handle_auth_response(int *consumed_response,
consider the reponse body as invalid and discard it. */
status = discard_body(response);
*consumed_response = 1;
-
if (!APR_STATUS_IS_EOF(status)) {
return status;
}
diff --git a/outgoing.c b/outgoing.c
index 0d0e5e2e1c9a..3fc726c038e4 100644
--- a/outgoing.c
+++ b/outgoing.c
@@ -916,22 +916,21 @@ static apr_status_t handle_response(serf_request_t *request,
* themselves by not registering credential callbacks.
*/
if (request->conn->ctx->cred_cb) {
- status = serf__handle_auth_response(&consumed_response,
- request,
- request->resp_bkt,
- request->handler_baton,
- pool);
-
- if (SERF_BUCKET_READ_ERROR(status)) {
- /* Report the request as 'died'/'cancelled' to the application */
- (void)(*request->handler)(request,
- NULL,
- request->handler_baton,
- pool);
- }
-
- if (status)
- return status;
+ status = serf__handle_auth_response(&consumed_response,
+ request,
+ request->resp_bkt,
+ request->handler_baton,
+ pool);
+
+ /* If there was an error reading the response (maybe there wasn't
+ enough data available), don't bother passing the response to the
+ application.
+
+ If the authentication was tried, but failed, pass the response
+ to the application, maybe it can do better. */
+ if (status) {
+ return status;
+ }
}
if (!consumed_response) {
diff --git a/serf.h b/serf.h
index 55d6a3a1b43e..d3ac2f3548de 100644
--- a/serf.h
+++ b/serf.h
@@ -1062,7 +1062,7 @@ void serf_debug__bucket_alloc_check(
/* Version info */
#define SERF_MAJOR_VERSION 1
#define SERF_MINOR_VERSION 3
-#define SERF_PATCH_VERSION 5
+#define SERF_PATCH_VERSION 6
/* Version number string */
#define SERF_VERSION_STRING APR_STRINGIFY(SERF_MAJOR_VERSION) "." \