Skip to content

Commit

Permalink
Merge pull request #256 from devfeel/develop
Browse files Browse the repository at this point in the history
use strings.Contains instead strings.Index, Thanks for @testwill!
  • Loading branch information
devfeel authored Dec 13, 2023
2 parents a96787b + 5473ef4 commit d50e13e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dotweb
// Global define
const (
// Version current version
Version = "1.7.21"
Version = "1.7.22"
)

// Log define
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ type LogJson struct {
// check request is the websocket request
// check Connection contains upgrade
func checkIsWebSocketRequest(req *http.Request) bool {
if strings.Index(strings.ToLower(req.Header.Get("Connection")), "upgrade") >= 0 {
if strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") {
return true
}
return false
Expand Down
5 changes: 5 additions & 0 deletions version.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## dotweb版本记录:

####Version 1.7.22
* tip: use strings.Contains instead strings.Index on server.go
* Thanks for @testwill #253!
* 2023-12-13 08:00 at ShangHai

####Version 1.7.21
* feature: add SessionManager.RemoveSessionState to delete the session state associated with a specific session ID
* feature: add HttpContext.DestorySession() to delete all contents of the session and set the sessionId to empty
Expand Down

0 comments on commit d50e13e

Please sign in to comment.