From 304a61803899cfd55f596f38d18c44fba03534ab Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Wed, 23 Nov 2011 19:04:13 +0200 Subject: [PATCH] Bug fix: HttpRequest::flags.intercepted, HttpRequest::flags.spoof_client_ip neve r set The request_flags::intercepted,request_flags::spoof_client_ip are 1 bit integers so when you are try to set to an integer bigger than 1 will overflow and the results will not be what you are expecting. --- src/client_side.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client_side.cc b/src/client_side.cc index 7e07cdab93..2504571bf4 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2541,8 +2541,8 @@ clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *c * from the port settings to the request. */ if (http->clientConnection != NULL) { - request->flags.intercepted = (http->clientConnection->flags & COMM_INTERCEPTION); - request->flags.spoof_client_ip = (http->clientConnection->flags & COMM_TRANSPARENT); + request->flags.intercepted = ((http->clientConnection->flags & COMM_INTERCEPTION) != 0); + request->flags.spoof_client_ip = ((http->clientConnection->flags & COMM_TRANSPARENT) != 0 ) ; } if (internalCheck(request->urlpath.termedBuf())) { -- 2.47.2