Skip to content

Commit d50e13e

Browse files
authored
Merge pull request #256 from devfeel/develop
use strings.Contains instead strings.Index, Thanks for @testwill!
2 parents a96787b + 5473ef4 commit d50e13e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

consts.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dotweb
33
// Global define
44
const (
55
// Version current version
6-
Version = "1.7.21"
6+
Version = "1.7.22"
77
)
88

99
// Log define

server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ type LogJson struct {
533533
// check request is the websocket request
534534
// check Connection contains upgrade
535535
func checkIsWebSocketRequest(req *http.Request) bool {
536-
if strings.Index(strings.ToLower(req.Header.Get("Connection")), "upgrade") >= 0 {
536+
if strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") {
537537
return true
538538
}
539539
return false

version.MD

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## dotweb版本记录:
22

3+
####Version 1.7.22
4+
* tip: use strings.Contains instead strings.Index on server.go
5+
* Thanks for @testwill #253!
6+
* 2023-12-13 08:00 at ShangHai
7+
38
####Version 1.7.21
49
* feature: add SessionManager.RemoveSessionState to delete the session state associated with a specific session ID
510
* feature: add HttpContext.DestorySession() to delete all contents of the session and set the sessionId to empty

0 commit comments

Comments
 (0)