httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/modules/http http_protocol.c
Date Thu, 25 Jan 2001 23:50:36 GMT
rbb         01/01/25 15:50:35

  Modified:    modules/http http_protocol.c
  Log:
  Store the original content_type before we replace it with the byterange
  C-T.  This allows us to report a correct content type in the boundary
  header.
  
  Revision  Changes    Path
  1.278     +3 -1      httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.277
  retrieving revision 1.278
  diff -u -d -b -w -u -r1.277 -r1.278
  --- http_protocol.c	2001/01/24 23:47:42	1.277
  +++ http_protocol.c	2001/01/25 23:50:33	1.278
  @@ -193,6 +193,7 @@
   typedef struct byterange_ctx {
       apr_bucket_brigade *bb;
       int num_ranges;
  +    const char *orig_ct;
   } byterange_ctx;
   
   /*
  @@ -245,6 +246,7 @@
           ctx->num_ranges = num_ranges;
   
           if (num_ranges > 1) {
  +            ctx->orig_ct = r->content_type;
               r->content_type = 
                    apr_pstrcat(r->pool, "multipart", use_range_x(r) ? "/x-" : "/",
                             "byteranges; boundary=", r->boundary, NULL);
  @@ -267,7 +269,7 @@
       bound_head = apr_pstrcat(r->pool,
                                CRLF "--", r->boundary,
                                CRLF "Content-type: ",
  -                             make_content_type(r, r->content_type),
  +                             make_content_type(r, ctx->orig_ct),
                                CRLF "Content-range: bytes ", 
                                NULL);
       ap_xlate_proto_to_ascii(bound_head, strlen(bound_head));
  
  
  

Mime
View raw message