You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ro...@apache.org on 2018/06/04 20:49:50 UTC

[incubator-trafficcontrol] 07/15: Fix content type and and range multipart

This is an automated email from the ASF dual-hosted git repository.

rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit 56a9db2b532681f3b89a4bbf8c0faa49d96376f3
Author: Jan van Doorn <jv...@knutsel.com>
AuthorDate: Fri May 25 16:39:22 2018 -0600

    Fix content type and and range multipart
---
 grove/plugin/range_req_handler.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grove/plugin/range_req_handler.go b/grove/plugin/range_req_handler.go
index cbb9a2a..c09c3cc 100644
--- a/grove/plugin/range_req_handler.go
+++ b/grove/plugin/range_req_handler.go
@@ -175,8 +175,8 @@ func rangeReqHandleBeforeRespond(icfg interface{}, d BeforeRespondData) {
 		log.Debugf("range:%d-%d\n", thisRange.Start, thisRange.End)
 		if multipart {
 			body = append(body, []byte("\r\n--"+multipartBoundaryString+"\r\n")...)
-			body = append(body, []byte("Content-type: "+originalContentType+"%s\r\n")...)
-			body = append(body, []byte("Content-range: "+rangeString+"\r\n\r\n")...)
+			body = append(body, []byte("Content-type: "+originalContentType+"\r\n")...)
+			body = append(body, []byte("Content-range: "+rangeString+"/"+strconv.FormatInt(totalContentLength, 10)+"\r\n\r\n")...)
 		} else {
 			d.Hdr.Add("Content-Range", rangeString+"/"+strconv.FormatInt(totalContentLength, 10))
 		}

-- 
To stop receiving notification emails like this one, please contact
rob@apache.org.