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

Gcm 302 error #114

Open
guytuboul opened this issue Mar 18, 2015 · 2 comments
Open

Gcm 302 error #114

guytuboul opened this issue Mar 18, 2015 · 2 comments

Comments

@guytuboul
Copy link

Hey,
I saw recently that the library return an error with 302,meaning 'Found' and this is a common way of performing URL redirection.
Is this library support such response from gcm?
Thanks, guy

@hypesystem
Copy link
Collaborator

You are correct, currently anything other than a code 200 is treated as an error.

From W3Cs documentation on status codes:

The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests.
[...]
If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.

We send POST requests, so I am assuming that we shouldn't use the alternate URL (given in the Location header).

I have not experienced this issue, but I would be very interested in details on how to handle it.

@hypesystem
Copy link
Collaborator

This seems to be a previously reported issue (with GCM):

I don't see any documentation on how to handle it. I assume we could just re-run the request to the provided (temporary, alternate) URL, but I would like confirmation of this.

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

No branches or pull requests

2 participants