Open
Description
I have a simple program
package main
import (
"github.com/gin-contrib/gzip"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.New()
r.Use( gzip.Gzip(gzip.DefaultCompression))
r.GET("/x", func(c *gin.Context) {
c.JSON(200, gin.H{"hello": "world"})
})
r.Run()
}
when i do curl localhost:8080 -H 'accept-encoding: gzip' -v
I get a 200 response and when I do curl localhost:8080 -v
I get a 404 response.
I am not sure what I am doing wrong but it seems like the gzip buffer is being closed before gin writes its 404 which somehow messes up the eventual response object.
hitting the localhost:8080/x
endpoint works fine
Metadata
Metadata
Assignees
Labels
No labels