mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 02:27:19 -04:00 
			
		
		
		
	Merge pull request #713 from 5an1ty/patch-1
proxy: Allow mixed case Upgrade headers (WebSocket fix)
This commit is contained in:
		
						commit
						3d066789d3
					
				| @ -207,7 +207,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request, extr | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	if res.StatusCode == http.StatusSwitchingProtocols && res.Header.Get("Upgrade") == "websocket" { | ||||
| 	if res.StatusCode == http.StatusSwitchingProtocols && strings.ToLower(res.Header.Get("Upgrade")) == "websocket" { | ||||
| 		res.Body.Close() | ||||
| 		hj, ok := rw.(http.Hijacker) | ||||
| 		if !ok { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user