allow larger request size in HTTP proxy

allow larger request size in HTTP proxy & correctly nullify request
buffer
This commit is contained in:
z3APA3A 2015-05-04 17:23:26 +03:00
parent f287b94236
commit 252d481299
2 changed files with 3 additions and 3 deletions

View File

@ -239,7 +239,7 @@ void * proxychild(struct clientparam* param) {
bufsize = BUFSIZE; bufsize = BUFSIZE;
anonymous = param->srv->singlepacket; anonymous = param->srv->singlepacket;
for(;;){ for(;;){
memset(buf, 0, BUFSIZE); memset(buf, 0, bufsize);
inbuf = 0; inbuf = 0;
@ -494,7 +494,7 @@ for(;;){
} }
inbuf += i; inbuf += i;
if((bufsize - inbuf) < LINESIZE){ if((bufsize - inbuf) < LINESIZE){
if (bufsize > 20000){ if (bufsize > (LINESIZE * 16)){
RETURN (516); RETURN (516);
} }
if(!(newbuf = myrealloc(buf, bufsize + BUFSIZE))){RETURN (21);} if(!(newbuf = myrealloc(buf, bufsize + BUFSIZE))){RETURN (21);}

View File

@ -1,2 +1,2 @@
#define VERSION "3proxy-0.8b-devel" #define VERSION "3proxy-0.8b-devel"
#define BUILDDATE "150302205552" #define BUILDDATE "150302210600"