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

Response.ContentEncoding(): store as field and avoid using Header.SetCanonical() #1311

Merged
merged 2 commits into from Jun 5, 2022

Commits on Jun 5, 2022

  1. Response.ContentEncoding(): store as field

    The CE is not so often used for plain APIs responses and even not so often used for static files and on the fly compression.
    But still it should be checked each time.
    Also having a dedicated field getter and setter simplifies code
    stokito committed Jun 5, 2022
    Copy the full SHA
    2a3330c View commit details
    Browse the repository at this point in the history
  2. header.go Use shorter Response.setNonSpecial() and Request.setNonSpec…

    …ial() methods instead of SetCanonical()
    
    The change should improve performance because the setSpecialHeader() call is omitted.
    As a downside on adding a new basic header field all putHeader() must be replaced with a direct getter and setter.
    stokito committed Jun 5, 2022
    Copy the full SHA
    6729dee View commit details
    Browse the repository at this point in the history