I'm stuck on this problem while learning go/gin. When I use custom header gin makes it lowercase, here is code example:
package main
import "github.com/gin-gonic/gin"
func main() {
r := gin.New()
r.GET("/ping", func(c *gin.Context) {
c.Header("X-Next", "abc")
c.String(200, "ok")
})
r.Run(":9000")
}
Header becomes x-next
, can't figure it out why it is happening. Similar example with standard http
module works fine.