Repository navigation
Apply the Range header to GET requests only (#1734) - #1737
Merged
Merged
Conversation
RFC 9110 section 14.2: GET is the only method for which range handling is defined, the Range of any other method must be ignored. A HEAD or OPTIONS request with a range was answered 206. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 28, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #1734.
RFC 9110 §14.2: a server MUST ignore a
Rangeheader received with a method for which range handling is not defined, and GET is the only one.RangeFilter.afterHandleonly skipped the methods that are not safe, soHEAD,OPTIONSandTRACE(safe in Restlet) were answered206 Partial Content. AHEADwithRange: bytes=0-3returnedContent-Length: 4and aContent-Rangeinstead of the metadata of the full entity.The range is now applied to
GETonly. No API change.Tests:
RangeFilterTestCase(HEAD, OPTIONS, TRACE ignored, GET still 206) andRangeRequestEndToEndTestCase(real server: HEAD 200 with the fullContent-Length, OPTIONS not 206, GET 206).changes.mdupdated.Same fix on the other maintained versions: 3.0: #1735, 2.7: #1736
🤖 Generated with Claude Code