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

Remove unnecessary quoting around ETag in JSON response #1519

Merged
merged 1 commit into from
Mar 13, 2024

Commits on Mar 8, 2024

  1. Remove unnecessary quoting around ETag in JSON response

    The JSON marshaller will already escape the value appropriately. Quoting
    the value explicitly beforehand is counterproductive, as the quotes
    introduced in that step would be considered legitimate part of the ETag
    value and would be themselves escaped when marshalling.
    
    When setting the `ETag` HTTP response header, however, we do have to
    explicitly add the quoting. This is because double quotes are not added
    automatically for HTTP headers and, according to the [standard][1], the
    `ETag` header value _must_ be wrapped in double quotes.
    
    [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
    manuteleco committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    621ef3c View commit details
    Browse the repository at this point in the history