Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

is renderByteRanges doing the right thing? #64

Description

@stepcut

In this function:

renderByteRangesBuilder :: ByteRanges -> Blaze.Builder

The ByteRanges are render with an = sign. But according to section 14.16 of RFC2616:

https://www.ietf.org/rfc/rfc2616.txt

When rendering a byte range in a Content-Range header, there is no '=',

Content-Range = "Content-Range" ":" content-range-spec

       content-range-spec      = byte-content-range-spec
       byte-content-range-spec = bytes-unit SP
                                 byte-range-resp-spec "/"
                                 ( instance-length | "*" )

       byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
                                      | "*"
       instance-length           = 1*DIGIT

This is, of course, an = in the request. This seems like senseless inconsistency in the RFC itself.

Perhaps renderByteRanges is only intended to render the byte ranges in requests? And there should be a different function for rendering byte ranges in a response? Or I am misunderstanding something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions