From 49f9daaddeae2254ee49d059e22304d01012ea22 Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Fri, 4 Dec 2020 23:40:45 +0300 Subject: [PATCH] fix 00100 error in proxy --- src/proxy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index d16eadc..4ecb08c 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -263,6 +263,9 @@ for(;;){ } myfree(req); } + if(param->remsock == INVALID_SOCKET) { + memset(¶m->req, 0, sizeof(param->req)); + } req = (char *)mystrdup((char *)buf); if(!req){RETURN(510);} if(i<10) { @@ -315,6 +318,7 @@ for(;;){ *se = '/'; memmove(ss, se, i - (se - sb) + 1); } + else *se = ' '; } reqlen = i = (int)strlen((char *)buf); if(!strncasecmp((char *)buf, "CONNECT", 7))param->operation = HTTP_CONNECT; @@ -326,7 +330,6 @@ for(;;){ do { buf[inbuf+i]=0; -/*printf("Got: %s\n", buf+inbuf);*/ #ifndef WITHMAIN if(i > 25 && !param->srv->transparent && (!strncasecmp((char *)(buf+inbuf), "proxy-authorization", 19))){ sb = (char *)strchr((char *)(buf+inbuf), ':'); @@ -444,7 +447,6 @@ for(;;){ buf[inbuf] = 0; - reqsize = (int)strlen((char *)req); reqbufsize = reqsize + 1; @@ -498,7 +500,6 @@ for(;;){ param->redirtype = 0; memset(¶m->sinsl, 0, sizeof(param->sinsl)); memset(¶m->sinsr, 0, sizeof(param->sinsr)); - memset(¶m->req, 0, sizeof(param->req)); }