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

Close Request.BodyStream on malformed request #2258

Merged
merged 1 commit into from Mar 20, 2020
Merged

Conversation

tanner0101
Copy link
Member

@tanner0101 tanner0101 commented Mar 20, 2020

Request.BodyStream is now closed correctly when an error is caught while decoding streaming requests (#2258, fixes #2253).

@tanner0101 tanner0101 added bug Something isn't working semver-patch Internal changes only labels Mar 20, 2020
@tanner0101 tanner0101 added this to Awaiting Review in Vapor 4 via automation Mar 20, 2020
@tanner0101 tanner0101 changed the title fix body stream leak Close Request.BodyStream on malformed request Mar 20, 2020
@tanner0101 tanner0101 merged commit c113c4b into master Mar 20, 2020
Vapor 4 automation moved this from Awaiting Review to Done Mar 20, 2020
@tanner0101 tanner0101 deleted the tn-bodystream-leak branch March 20, 2020 21:34
@tanner0101
Copy link
Member Author

These changes are now available in 4.0.0-rc.3.7

pull bot pushed a commit to scope-demo/vapor that referenced this pull request Mar 21, 2020
nachoBonafonte pushed a commit to scope-demo/vapor that referenced this pull request Mar 23, 2020
* Remove double quotes from cooke value (vapor#2215)

* remove double quotes from cookie value

* naming

* naming

* Expose initializer of Validator (vapor#2232)

vapor#2231

Co-authored-by: seeppp <jonas.schoch@naptics.ch>

* Allow WebSocket maxFrameSize to be configured (vapor#2195)

* Allow WebSocket maxFrameSize to be configured.

* Change maxFrameSize to an enum instead of optional.

* Implement `.hex`, `hexEncodedString()`, and `hexEncodedBytes()` on Sequence instead of restricting them to Collection. (vapor#2249)

- Make `hexEncodedBytes()` public, why wouldn't it be?
- Specialize `hexEncodedBytes()` on `Collection` to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice.
- Add unit test to make sure it works on `Sequence`s.

* close mode output keep-alive (vapor#2257)

* fix body stream leak (vapor#2258)

Co-authored-by: Tanner <tannernelson@gmail.com>
Co-authored-by: Seeppp <jonas.schoch@icloud.com>
Co-authored-by: seeppp <jonas.schoch@naptics.ch>
Co-authored-by: Bridger Maxwell <bridger.maxwell@gmail.com>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
nachoBonafonte pushed a commit to scope-demo/vapor that referenced this pull request Mar 24, 2020
* Remove double quotes from cooke value (vapor#2215)

* remove double quotes from cookie value

* naming

* naming

* Expose initializer of Validator (vapor#2232)

vapor#2231

Co-authored-by: seeppp <jonas.schoch@naptics.ch>

* Allow WebSocket maxFrameSize to be configured (vapor#2195)

* Allow WebSocket maxFrameSize to be configured.

* Change maxFrameSize to an enum instead of optional.

* Implement `.hex`, `hexEncodedString()`, and `hexEncodedBytes()` on Sequence instead of restricting them to Collection. (vapor#2249)

- Make `hexEncodedBytes()` public, why wouldn't it be?
- Specialize `hexEncodedBytes()` on `Collection` to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice.
- Add unit test to make sure it works on `Sequence`s.

* close mode output keep-alive (vapor#2257)

* fix body stream leak (vapor#2258)

Co-authored-by: Tanner <tannernelson@gmail.com>
Co-authored-by: Seeppp <jonas.schoch@icloud.com>
Co-authored-by: seeppp <jonas.schoch@naptics.ch>
Co-authored-by: Bridger Maxwell <bridger.maxwell@gmail.com>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semver-patch Internal changes only
Projects
Vapor 4
  
Done
Development

Successfully merging this pull request may close these issues.

memory leak when stream closes mid body
1 participant