File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 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 {
246246
247247func (c * context ) IsWebSocket () bool {
248248 upgrade := c .request .Header .Get (HeaderUpgrade )
249- return strings .ToLower (upgrade ) == "websocket"
249+ return strings .EqualFold (upgrade , "websocket" )
250250}
251251
252252func (c * context ) Scheme () string {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc {
7373 auth := c .Request ().Header .Get (echo .HeaderAuthorization )
7474 l := len (basic )
7575
76- if len (auth ) > l + 1 && strings .ToLower (auth [:l ]) == basic {
76+ if len (auth ) > l + 1 && strings .EqualFold (auth [:l ], basic ) {
7777 b , err := base64 .StdEncoding .DecodeString (auth [l + 1 :])
7878 if err != nil {
7979 return err
You can’t perform that action at this time.
0 commit comments