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

Support range-requests beyond EOF. Return up to EOF. #2997

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

keniwhat
Copy link

Allow byte range requests to exceed EOF.

Support HTTP/1.1 range requests past end-of-file.

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need a test for this as well as the review comments - thanks!

Sources/Vapor/HTTP/Headers/HTTPHeaders+ContentRange.swift Outdated Show resolved Hide resolved
Sources/Vapor/Utilities/FileIO.swift Outdated Show resolved Hide resolved
@keniwhat keniwhat requested a review from gwynne as a code owner August 25, 2023 10:49
@gwynne gwynne requested a review from 0xTim August 25, 2023 10:54
Ken Carroll added 2 commits August 25, 2023 13:10
* main: (75 commits)
  Make Storage Sendable (vapor#3056)
  Add Sendable Conformances to undelying types (vapor#3054)
  Resolve issue vapor#2650 (vapor#2674)
  Fix for vapor#2574 Missing quote from value (vapor#2839)
  Allow specifying a timeout for client requests (vapor#3043)
  Update dependencies with known CVEs to the latest versions (vapor#3038)
  Create CODEOWNERS
  Improve error reporting for `EncodingError` and `DecodingError` (vapor#2981)
  Fix incorrect use of non-localhost connection in test
  Update README with new Sponsor (vapor#3025)
  Add `ContentContainer.decode(_:as:)` (vapor#3023)
  Fixed drain handler call order in case of asynchronous buffer handling (vapor#3009)
  Update README with new Sponsor (vapor#3024)
  Update README with new Sponsor (vapor#3020)
  Don't use UnsafeRawBufferPointer.withMemoryRebound(to:_:) before Swift 5.7.2 (vapor#3021)
  Avoid deadlocking websocket tests (vapor#3019)
  Update README with new Sponsor (vapor#3014)
  Fix `Range: bytes=0-0` header not working properly (vapor#3010)
  Remove use of HTTPBin (vapor#3017)
  Improved error logging (vapor#3016)
  ...

# Conflicts:
#	Sources/Vapor/HTTP/Headers/HTTPHeaders+ContentRange.swift
#	Sources/Vapor/Utilities/FileIO.swift
@keniwhat
Copy link
Author

Updated this branch as requested. Also synced the branch to vapor/vapor:main. Should be ready now for merge back onto vapor/vapor:main.

@0xTim 0xTim added the semver-patch Internal changes only label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Internal changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants