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

[Question] Long running operations on 200 with a Retry-After VS other standards (e.g. w3.org) #76

Open
whozDougie opened this issue Nov 23, 2016 · 2 comments

Comments

@whozDougie
Copy link

@whozDougie whozDougie commented Nov 23, 2016

Hi there,

I started following the guidelines for Long running operations on 200 with a Retry-After, however, I quickly found that other frameworks such as jQuery does not support 200 with a Retry-After.

An Article from Mozilla indicates that Retry-After is used with "413 Payload Too Large" and "503 Service Unavailable".
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

Also another article states the header can be used with 503 or 3XX: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

I'm not sure which standard / guideline is correct here, but I don't feel very confident with using 200 - unless I am missing something here.

Many thanks,
WhozDougie

@darrelmiller
Copy link
Member

@darrelmiller darrelmiller commented Nov 23, 2016

@whozDougie I would recommend using RFC 7231 as the definitive source of information about status codes. Technically, someone could return a retry-after header with any status code. The specifications simply suggest common cases where it is used. You are correct that it is not common to return a retry-after with a 200 status code, but it is also not invalid.

When it comes to writing retry-code, the main issues that should be of concern is if there is a retry-after header and whether the method is safe/unsafe.

@whozDougie
Copy link
Author

@whozDougie whozDougie commented Nov 23, 2016

Thanks Darrel, that's made it clearer.

@whozDougie whozDougie changed the title [Question] Long running operations on 200 with a Retry-After VS other standards from w3.org [Question] Long running operations on 200 with a Retry-After VS other standards (e.g. w3.org) Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.