mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-03 06:04:53 +00:00
- update to 1.3.6
Changelog: 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.
This commit is contained in:
parent
30cf5189b4
commit
42d9be21b2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357360
@ -2,8 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= serf
|
||||
PORTVERSION= 1.3.5
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 1.3.6
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://serf.googlecode.com/svn/src_releases/
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (serf-1.3.5.tar.bz2) = d311ce81a58301f47e652e54551999033880decefae0deea58ba5415776b1fc3
|
||||
SIZE (serf-1.3.5.tar.bz2) = 140554
|
||||
SHA256 (serf-1.3.6.tar.bz2) = ca637beb0399797d4fc7ffa85e801733cd9c876997fac4a4fd12e9afe86563f2
|
||||
SIZE (serf-1.3.6.tar.bz2) = 140671
|
||||
|
@ -1,47 +0,0 @@
|
||||
--- ./outgoing.c.orig 2014-04-21 16:56:02.000000000 +0200
|
||||
+++ ./outgoing.c 2014-06-08 18:17:48.000000000 +0200
|
||||
@@ -23,6 +23,13 @@
|
||||
|
||||
#include "serf_private.h"
|
||||
|
||||
+/* Some implementations -like Windows- report some hangup errors via a
|
||||
+ different event than the specific HUP event. */
|
||||
+#define APR_STATUS_IMPLIES_HANGUP(status) \
|
||||
+ (APR_STATUS_IS_ECONNRESET(status) || \
|
||||
+ APR_STATUS_IS_ECONNABORTED(status) || \
|
||||
+ status == SERF_ERROR_REQUEST_LOST)
|
||||
+
|
||||
/* cleanup for sockets */
|
||||
static apr_status_t clean_skt(void *data)
|
||||
{
|
||||
@@ -922,8 +929,12 @@
|
||||
request->handler_baton,
|
||||
pool);
|
||||
|
||||
- if (SERF_BUCKET_READ_ERROR(status)) {
|
||||
- /* Report the request as 'died'/'cancelled' to the application */
|
||||
+ if (SERF_BUCKET_READ_ERROR(status)
|
||||
+ && !APR_STATUS_IMPLIES_HANGUP(status)) {
|
||||
+
|
||||
+ /* Report the request as 'died'/'cancelled' to the application,
|
||||
+ but only if our caller doesn't handle this status specifically,
|
||||
+ with something like a retry */
|
||||
(void)(*request->handler)(request,
|
||||
NULL,
|
||||
request->handler_baton,
|
||||
@@ -1128,10 +1139,12 @@
|
||||
|
||||
/* Some systems will not generate a HUP poll event so we have to
|
||||
* handle the ECONNRESET issue and ECONNABORT here.
|
||||
+ *
|
||||
+ * ### Update similar code in handle_response() if this condition
|
||||
+ * changes, or requests will get lost and/or accidentally reported
|
||||
+ * cancelled.
|
||||
*/
|
||||
- if (APR_STATUS_IS_ECONNRESET(status) ||
|
||||
- APR_STATUS_IS_ECONNABORTED(status) ||
|
||||
- status == SERF_ERROR_REQUEST_LOST) {
|
||||
+ if (APR_STATUS_IMPLIES_HANGUP(status)) {
|
||||
/* If the connection had ever been good, be optimistic & try again.
|
||||
* If it has never tried again (incl. a retry), fail.
|
||||
*/
|
Loading…
Reference in New Issue
Block a user