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

Noncompliant Push Response #800

Closed
jwilm opened this issue Nov 18, 2024 · 5 comments · Fixed by #801
Closed

Noncompliant Push Response #800

jwilm opened this issue Nov 18, 2024 · 5 comments · Fixed by #801
Assignees

Comments

@jwilm
Copy link

jwilm commented Nov 18, 2024

Hello,

We have been seeing a lot (10s of thousands) of 200 OK response codes from sending push messages to firefox users. Here's an example response with the location header obfuscated.

"Response { status: 200, version: HTTP/1.1, headers: {"server": "nginx", "date": "Mon, 18 Nov 2024 19:11:00 GMT", "content-length": "0", "ttl": "259200", "vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers", "location": "https://updates.push.services.mozilla.com/m/<snip>", "strict-transport-security": "max-age=31536000", "via": "1.1 google", "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"}, body: Body(Empty) }"

Based on the response headers, it seems that nginx might be rewriting the response code.

cc @chamons

┆Issue is synchronized with this Jira Task

@pjenvey
Copy link
Member

pjenvey commented Nov 18, 2024

Could you be more specific about how this response is non-compliant?

@jrconlin
Copy link
Member

Thank you. We have identified a bug inside of our code where we return a 200 when messages are handed off to some routers. Since our system can not ensure delivery of a message to the User Agent at this time, we should only return 201 (as per the RFC).

We cannot ensure end-to-end delivery because our system relies on using third party delivery systems for mobile devices which also do not provide this capability.

@jrconlin jrconlin self-assigned this Nov 18, 2024
@jwilm
Copy link
Author

jwilm commented Nov 18, 2024

Seems like this has already been addressed, but just for posterity wanted to answer this question:

Could you be more specific about how this response is non-compliant?

The push RFC defines only 201 and 202 as valid successful response codes when sending a push message. 201 seems to be the expectation when not requesting receipts.

Thanks all.

@jrconlin
Copy link
Member

FWIW, I want to thank you for being one of the very few folk that actually pay attention to the response codes we provide.

@jwilm
Copy link
Author

jwilm commented Nov 18, 2024

Hah, of course. I'm appreciative with how open the Mozilla push implementation is and how easy it is to provide that feedback in the first place. Thanks for addressing the issue so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants