Browse Source

allow larger request size in HTTP proxy

allow larger request size in HTTP proxy & correctly nullify request
buffer
z3APA3A 10 years ago
parent
commit
252d481299
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/proxy.c
  2. 1 1
      src/version.h

+ 2 - 2
src/proxy.c

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

+ 1 - 1
src/version.h

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