-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(remix-server-runtime): strip body
from request
before calling loader
s
#3207
Conversation
chore: remove duplicate method definition Since loaders map to "GET" and "HEAD" requests, those by definition can't have a body and therefore there is no reason to pass it in to use-code. This also avoids exclusive locks on the body when multiple loaders are executed in parallel. Changes: - Action recieves OG request and can choose to read the body. - handleDocumentRequest recieves OG request, if the action read the body it will be locked and `bodyUsed` will be true. Atempting to read the body again will throw - Loaders recieve a copy of the OG request without the body.
body
from request
before calling loader
s
@jacob-ebey any chance we could get a test case in here? |
@chaance I would love to but none of this is broken on node and we don't have a way to easily run integration tests against other runtimes. This is a CF / Deno only issue. |
👍
😭 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
chore: remove duplicate method definition
Since loaders map to "GET" and "HEAD" requests, those by definition can't have a body and therefore there is no reason to pass it in to use-code. This also avoids exclusive locks on the body when multiple loaders are executed in parallel.
Changes:
bodyUsed
will be true. Atempting to read the body again will throwCloses: #3003