-
Notifications
You must be signed in to change notification settings - Fork 26
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
What should we do if a launch handler reads POST data from a request but doesn't handle the launch? #17
Comments
@jakearchibald could you explain your concerns here a bit more so we can make sure we address the issue properly? |
Wouldn't that prevent the share target use-case?
You can't typically read a request/response body twice. If the developer reads it in the launch event, how will the browser be able to read it when it makes the actual request? |
I think there's often enough information in the query string to decide what to do. But yeah, you're right, blocking reading probably isn't a great solution :/ |
@jakearchibald interesting. What happens in a fetch handler if you read the request body and then request() it? I guess the same thing could happen? |
Oh I just noticed your answer to the same question in #15. It seems like it should work ok. In that case perhaps we can close this? |
This is based on #15.
I have two main thoughts here:
a) As the launch event handler is likely to have an aggressive timeout, reading the request body is probably not a good idea - Maybe we should block reading the body?
b) However we handle this, it should match up exactly with whatever fetch does.
@raymeskhoury for input.
The text was updated successfully, but these errors were encountered: