Skip to content

Commit

Permalink
Fixing Header mime key
Browse files Browse the repository at this point in the history
  • Loading branch information
Dodi Triwibowo committed May 30, 2020
1 parent 7135f0f commit 13576b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/verzth/go-utils/utils"
"mime/multipart"
"net/http"
"net/textproto"
"reflect"
"strconv"
"strings"
Expand Down Expand Up @@ -481,7 +482,7 @@ func (r *Request) Filled(keys... string) (found bool) {
}

func (r *Request) hasHeader(key string) bool {
if _, found := r.header[strings.Title(key)]; !found {
if _, found := r.header[textproto.CanonicalMIMEHeaderKey(key)]; !found {
return false
}
return true
Expand Down

0 comments on commit 13576b6

Please sign in to comment.