From: Jeff Trawick Date: Tue, 2 Jan 2001 19:22:09 +0000 (+0000) Subject: EBCDIC: Fix some byterange protocol data translation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d256d2d4c41e5b8656285fce3c6933a18cffebbc;p=apache EBCDIC: Fix some byterange protocol data translation. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87571 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 6fe55272b0..668b4d07a3 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -222,7 +222,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter( apr_off_t range_start; apr_off_t range_end; char *current; - const char *bound_head; + char *bound_head; int clength = 0; apr_status_t rv; int found = 0; @@ -268,6 +268,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter( make_content_type(r, r->content_type), CRLF "Content-range: bytes ", NULL); + ap_xlate_proto_to_ascii(bound_head, strlen(bound_head)); /* concat the passed brigade with our saved brigade */ AP_BRIGADE_CONCAT(ctx->bb, bb); @@ -370,7 +371,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter( } if (ctx->num_ranges > 1) { - const char *ts; + char *ts; e = ap_bucket_create_pool(bound_head, strlen(bound_head), r->pool); @@ -378,6 +379,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter( ts = apr_psprintf(r->pool, BYTERANGE_FMT CRLF CRLF, range_start, range_end, clength); + ap_xlate_proto_to_ascii(ts, strlen(ts)); e = ap_bucket_create_pool(ts, strlen(ts), r->pool); AP_BRIGADE_INSERT_TAIL(bsend, e); } @@ -393,10 +395,11 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter( } if (ctx->num_ranges > 1) { - const char *end; + char *end; /* add the final boundary */ end = apr_pstrcat(r->pool, CRLF "--", r->boundary, "--" CRLF, NULL); + ap_xlate_proto_to_ascii(end, strlen(end)); e = ap_bucket_create_pool(end, strlen(end), r->pool); AP_BRIGADE_INSERT_TAIL(bsend, e); }