The unified diff between revisions [d3d18279..] and [274a10b7..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/http.c'

#
#
# patch "src/http.c"
#  from [69d4e2cd7969e575f5cdba81916aab1f9b2c6223]
#    to [88bffb5cf44e30acc04d196f97cf31496043f0ac]
#
============================================================
--- src/http.c	69d4e2cd7969e575f5cdba81916aab1f9b2c6223
+++ src/http.c	88bffb5cf44e30acc04d196f97cf31496043f0ac
@@ -581,16 +581,6 @@ httpReadReply(int fd, void *data)
     else
 	delay_id = delayMostBytesAllowed(entry->mem_obj, &read_sz);
 #endif
-    if ( httpState->request->flags.pinned ) {
-	client_addr=&httpState->request->client_addr;
-	client_port=httpState->request->client_port;
-    }
-#if LINUX_TPROXY
-    else if ( ( Config.onoff.linux_tproxy ) &&
-      ( (httpState->request->my_port == Config.tproxy_port) || (Config.tproxy_port == 0) )) {
-        client_addr=&httpState->request->client_addr;
-    }
-#endif

     errno = 0;
     statCounter.syscalls.sock.reads++;
@@ -742,6 +732,16 @@ httpReadReply(int fd, void *data)
 		    }
 		}
 		if (keep_alive) {
+		    if ( httpState->request->flags.pinned ) {
+			client_addr=&httpState->request->client_addr;
+			client_port=httpState->request->client_port;
+		    }
+#if LINUX_TPROXY
+		    else if ( ( Config.onoff.linux_tproxy ) &&
+		      ( (httpState->request->my_port == Config.tproxy_port) || (Config.tproxy_port == 0) )) {
+			client_addr=&httpState->request->client_addr;
+		    }
+#endif
 		    /* yes we have to clear all these! */
 		    commSetDefer(fd, NULL, NULL);
 		    commSetTimeout(fd, -1, NULL, NULL);