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
I have a large response that changes infrequently that is a good use case for a status 304 to the browser. When I use that currently the json body that I have built is assigned to the Location response header.
In the handler I send back an ETag and test the If-None-Matchto see if a 304 is fitting.
304 is a bug, definitely, thanks for reporting it. A PR would be helpful. Your PR also removes CORS headers which I'm not 100% sure about (seems OK, just need to investigate some scenarios here first to confirm), so it would be good to split that into two PRs, so we can investigate/test both separately.
…Holly](https://github.com/phips28)) \
- limit magic location header only to actual 3xx redirects (301 and 302), allowing other codes such as 304 to be handled differently, fixes [issue 20](#20)
I think stripping the body is pushing a bit too much responsibility into the api builder, client developers should be able to decide that on their own - so when you send a 304, just don't send a body.
I've changed the api builder so it does not mess with the response unless it's 301/302, so 304 should be just like any other response now. the change is on NPM as version 2.1.0
I have a large response that changes infrequently that is a good use case for a status
304
to the browser. When I use that currently the json body that I have built is assigned to the Location response header.In the handler I send back an ETag and test the
If-None-Match
to see if a 304 is fitting.An example of how simple the tests + fix can be https://github.com/chamaeleonidae/claudia-api-builder/commit/8d1222fefd67c6d7730a5707a42dd4d711630455
If this is useful I'll add a PR to support 304's
The text was updated successfully, but these errors were encountered: