Skip to content

gzip causes ERR_CONTENT_DECODING_FAILED with c.String #62

@lawlite

Description

@lawlite

When I used c.String for serving, gzip causes decoding error.
(Google Chrome said ERR_CONTENT_DECODING_FAILED. IE, Edge, Firefox also got same error.)

Even gzip/example/example.go did NOT worked, too. (My Golang version is 1.5)

In my project built under Golang 1.5, I tested several options like c.String, c.HTML, and c.JSON.

Result:
c.String(200, "OK") => Decoding Error
c.HTML(200, "blahblah.html", gin.H{"example": anything ~~~ ... }) => Gzip worked good
c.JSON(200, articles) => Gzip worked good

So, I think that there is a something issue with gzip + c.String.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions