mirror of
https://github.com/cupcakearmy/codecrafters-http-server-go.git
synced 2024-12-21 23:56:30 +00:00
check for multiple values in header
This commit is contained in:
parent
49e5c8105d
commit
6510189400
@ -67,7 +67,7 @@ func Respond(conn net.Conn, req Request, res Response) {
|
||||
if res.Headers == nil {
|
||||
res.Headers = make(map[string]string)
|
||||
}
|
||||
if req.Headers["Accept-Encoding"] == "gzip" {
|
||||
if strings.Contains(req.Headers["Accept-Encoding"], "gzip") {
|
||||
res.Headers["Content-Encoding"] = "gzip"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user