You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
Sending a push request to a non-existing endpoint URL causes a 404 response (as expected). But this response should use the Content-Type JSON instead of HTML. How to reproduce:
$ curl -v --data '' https://updates.push.services.mozilla.com/push/v1/foo
> POST /push/v1/foo HTTP/1.1
> Host: updates.push.services.mozilla.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 404 Not Found
< Content-Type: text/html; charset=UTF-8
< Date: Fri, 02 Dec 2016 08:24:00 GMT
< Content-Length: 69
< Connection: keep-alive
<
<html><title>404: Not Found</title><body>404: Not Found</body></html>
The text was updated successfully, but these errors were encountered:
Tip-of-tree fiorix/cyclone supports custom error handlers via an
`error_handler` argument to `cyclone.web.Application`, but that hasn't
been published to PyPI yet. We work around this by registering a
catch-all handler that returns a 404 instead.
Closes#756.
Moreover consider adding an errno to the JSON.
Based on your docs it should be "errno 102 - Invalid URL endpoint": I would use that for a double check before deleting the endpoint from the app server. If I get a 404 I also check the errno: if it's equal to 102 then delete the endpoint otherwise do nothing (this is because I fear that your server may return a 404 for other / temporary reasons).
Sending a push request to a non-existing endpoint URL causes a 404 response (as expected). But this response should use the Content-Type JSON instead of HTML. How to reproduce:
The text was updated successfully, but these errors were encountered: