Match any Connection header that contains the Upgrade token for websocke...

...ts
The mustcompile part - as a var, not a const, sorry.

> On Sep 17, 2014, at 5:19 PM, Jessica Forrester <notifications@github.com> wrote:
> 
> In pkg/apiserver/watch.go:
> 
> > @@ -52,6 +54,11 @@ func getWatchParams(query url.Values) (label, field labels.Selector, resourceVer
> >  	return label, field, resourceVersion
> >  }
> >  
> > +func isWebsocketRequest(req *http.Request) bool {
> > +	connRegex := regexp.MustCompile("(^|.*,\\s*)upgrade($|\\s*,)")
> You mean just the string portion of it? something like:
> 
> const connectionUpgradeRegex = "(^|.,\s)upgrade($|\s*,)"
> 
> —
> Reply to this email directly or view it on GitHub.