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

Figure out real status with always200 #74

Open
oleksandr opened this issue Nov 28, 2013 · 1 comment
Open

Figure out real status with always200 #74

oleksandr opened this issue Nov 28, 2013 · 1 comment

Comments

@oleksandr
Copy link

Here's a situation we've faced. We store some media objects (AWS S3 backend) and the API returns temporary redirects with timestamped signature in the URL. The resource requires our custom token-based authentication (Authorization header in request).
The client-side (JS app) uses direct URLs to resources in tags like but it fails because of authentication. When using a XHR to perform authorised request the XHR follows redirect automatically (no chance to switch it off) and this one is also not an option.

The always200=true therefore is a good way to overcome this problem. But in this case the response from the server contain http status 200 and of course an empty body (originally we send a temporary redirect). Therefore it's nearly impossible to figure out what's happening on the server (without looking into the headers of course).

The question is would it be an expected behaviour from goweb to force to include a body, where it was not specified in cases with awlays200 to contain at least { s:REAL_STATUS} ?

@matryer
Copy link
Member

matryer commented Jan 19, 2014

This makes sense - but Goweb only takes the body from user code, so there's no opportunity for it to write an empty body. When would it do it?

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

No branches or pull requests

2 participants