Date: Mon, 21 Jul 2014 22:10:29 +0000 (UTC) From: Peter Wemm <peter@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268960 - in head/contrib/serf: . auth Message-ID: <201407212210.s6LMAToP074623@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: peter Date: Mon Jul 21 22:10:29 2014 New Revision: 268960 URL: http://svnweb.freebsd.org/changeset/base/268960 Log: Merge 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. Modified: head/contrib/serf/CHANGES head/contrib/serf/auth/auth.c head/contrib/serf/outgoing.c head/contrib/serf/serf.h Directory Properties: head/contrib/serf/ (props changed) Modified: head/contrib/serf/CHANGES ============================================================================== --- head/contrib/serf/CHANGES Mon Jul 21 22:09:16 2014 (r268959) +++ head/contrib/serf/CHANGES Mon Jul 21 22:10:29 2014 (r268960) @@ -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) Modified: head/contrib/serf/auth/auth.c ============================================================================== --- head/contrib/serf/auth/auth.c Mon Jul 21 22:09:16 2014 (r268959) +++ head/contrib/serf/auth/auth.c Mon Jul 21 22:10:29 2014 (r268960) @@ -408,7 +408,6 @@ apr_status_t serf__handle_auth_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; } Modified: head/contrib/serf/outgoing.c ============================================================================== --- head/contrib/serf/outgoing.c Mon Jul 21 22:09:16 2014 (r268959) +++ head/contrib/serf/outgoing.c Mon Jul 21 22:10:29 2014 (r268960) @@ -916,22 +916,21 @@ static apr_status_t handle_response(serf * 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) { Modified: head/contrib/serf/serf.h ============================================================================== --- head/contrib/serf/serf.h Mon Jul 21 22:09:16 2014 (r268959) +++ head/contrib/serf/serf.h Mon Jul 21 22:10:29 2014 (r268960) @@ -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) "." \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407212210.s6LMAToP074623>