summaryrefslogtreecommitdiffstats
path: root/modules/http
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2001-01-26 00:50:33 +0100
committerRyan Bloom <rbb@apache.org>2001-01-26 00:50:33 +0100
commit2b21bf6dfd5664e8d6af3aaf6e3ffce18e62030d (patch)
tree9fbd570f921b6a0474d0ae67c2180ad52dd32539 /modules/http
parentget mod_unique_id building again...XtOffset was undefined (diff)
downloadapache2-2b21bf6dfd5664e8d6af3aaf6e3ffce18e62030d.tar.xz
apache2-2b21bf6dfd5664e8d6af3aaf6e3ffce18e62030d.zip
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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87845 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r--modules/http/http_protocol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index 48f2d877e3..86a2e72f37 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -193,6 +193,7 @@ static int ap_set_byterange(request_rec *r);
typedef struct byterange_ctx {
apr_bucket_brigade *bb;
int num_ranges;
+ const char *orig_ct;
} byterange_ctx;
/*
@@ -245,6 +246,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
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 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
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));