Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Form reader should rewind buffer after parsing #366

Closed
Tratcher opened this issue Aug 7, 2015 · 0 comments
Closed

Form reader should rewind buffer after parsing #366

Tratcher opened this issue Aug 7, 2015 · 0 comments
Assignees

Comments

@Tratcher
Copy link
Member

Tratcher commented Aug 7, 2015

Reading the request body as a for fully buffers the body (https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.AspNet.Http/Features/FormFeature.cs#L88), but does not rewind after parsing.

After parsing the form, rewind the buffer to the beginning so that if someone else can read the body directly without knowing if they can/should rewind. Here? https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.AspNet.Http/Features/FormFeature.cs#L150

Otherwise all of the callers need to remember do this:
https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenIdConnectAuthenticationHandler.cs#L269

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