Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: support multiple byte ranges #3784

Closed
bradfitz opened this issue Jun 28, 2012 · 1 comment
Closed

net/http: support multiple byte ranges #3784

bradfitz opened this issue Jun 28, 2012 · 1 comment

Comments

@bradfitz
Copy link
Contributor

Go's HTTP file server (FileServer & ServeContent) only supports a single byte range.

We need to support multiple byte ranges and generate the multipart response.  For
example:

$ telnet apache.org 80
GET / HTTP/1.1
Host: apache.org
Range: bytes=1-10,20-25

HTTP/1.1 206 Partial Content
Date: Thu, 28 Jun 2012 20:45:12 GMT
Server: Apache/2.4.1 (Unix) OpenSSL/1.0.0g
Last-Modified: Thu, 28 Jun 2012 20:12:15 GMT
ETag: "8f13-4c38df2a86c8a"
Accept-Ranges: bytes
Content-Length: 235
Vary: Accept-Encoding
Cache-Control: max-age=3600
Expires: Thu, 28 Jun 2012 21:45:12 GMT
Content-Type: multipart/byteranges; boundary=176b487255f68cc5


--176b487255f68cc5
Content-type: text/html; charset=utf-8
Content-range: bytes 1-10/36627

!DOCTYPE H
--176b487255f68cc5
Content-type: text/html; charset=utf-8
Content-range: bytes 20-25/36627

C "-//
--176b487255f68cc5--
@bradfitz
Copy link
Contributor Author

Comment 1:

This issue was closed by revision fa6f9b4.

Status changed to Fixed.

@bradfitz bradfitz added the fixed label Jun 29, 2012
@bradfitz bradfitz self-assigned this Jun 29, 2012
bradfitz added a commit that referenced this issue May 11, 2015
…ontent

««« backport 070604630d24
net/http: support multiple byte ranges in ServeContent

Fixes #3784

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6351052

»»»
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants