httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@locus.apache.org
Subject cvs commit: apache-1.3/src/main http_protocol.c
Date Mon, 06 Nov 2000 22:05:17 GMT
fanf        00/11/06 14:05:15

  Modified:    src/main http_protocol.c
  Log:
  Fix byte range content length calculations, which should fix the reported
  problems with byteserved PDFs. I've had a couple of reports that things
  work OK with this patch but more testing would be good.
  PR: 6711
  
  Revision  Changes    Path
  1.292     +4 -2      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.291
  retrieving revision 1.292
  diff -u -u -r1.291 -r1.292
  --- http_protocol.c	2000/10/10 03:29:08	1.291
  +++ http_protocol.c	2000/11/06 22:05:13	1.292
  @@ -237,6 +237,7 @@
           long tlength = 0;
   	int ret;
   	
  +        r->byterange = 2;
           r->boundary = ap_psprintf(r->pool, "%lx%lx",
   				r->request_time, (long) getpid());
           do {
  @@ -245,11 +246,12 @@
   	} while (ret == 1);
   	/* If an error occured processing one of the range specs, we
   	 * must fail */
  -	if (ret < 0)
  +	if (ret < 0) {
  +	    r->byterange = 0;
   	    return 0;
  +	}
           ap_table_setn(r->headers_out, "Content-Length",
   	    ap_psprintf(r->pool, "%ld", tlength));
  -        r->byterange = 2;
       }
   
       r->status = PARTIAL_CONTENT;
  
  
  

Mime
View raw message