File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ func (c *context) IsTLS() bool {
246
246
247
247
func (c * context ) IsWebSocket () bool {
248
248
upgrade := c .request .Header .Get (HeaderUpgrade )
249
- return strings .ToLower (upgrade ) == "websocket"
249
+ return strings .EqualFold (upgrade , "websocket" )
250
250
}
251
251
252
252
func (c * context ) Scheme () string {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc {
73
73
auth := c .Request ().Header .Get (echo .HeaderAuthorization )
74
74
l := len (basic )
75
75
76
- if len (auth ) > l + 1 && strings .ToLower (auth [:l ]) == basic {
76
+ if len (auth ) > l + 1 && strings .EqualFold (auth [:l ], basic ) {
77
77
b , err := base64 .StdEncoding .DecodeString (auth [l + 1 :])
78
78
if err != nil {
79
79
return err
You can’t perform that action at this time.
0 commit comments