Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // CookieInspectionHandler is an http.HandlerFunc that returns 400 if the ROUTEID cookie isn't set CookieInspectionHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { c, err := r.Cookie("ROUTEID") if err != nil || c.Value == "" { w.WriteHeader(http.StatusBadRequest) w.Write(gross) return } w.Write(ok) }) // TestHandler is an http.HandlerFunc that quickly returns 200 TestHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write(ok) }) )
Functions ¶
func ParamInspectionFormValueHandler ¶ added in v1.3.0
ParamInspectionFormValueHandler uses the http.Request.FormValue facility to grab the ROUTEID off the paramlist. This is by far the fastest way to do this, but alters the body, rendering application-level checksums invalid, and breaking brittle destinations that make expectations about its condition.
func ParamInspectionURLQueryContainsHandler ¶ added in v1.3.0
ParamInspectionURLQueryContainsHandler is a variation of ParamInspection_URLQuery_Handler, that first inspects the http.Request.URL.RawQuery string, to see if it Contains (or may contain) the ROUTEID, before decoding the Query, which is a very expensive operation.
func ParamInspectionURLQueryHandler ¶ added in v1.3.0
ParamInspectionURLQueryHandler uses the http.Request.URL.Query().Get facility to grab the ROUTEID off the paramlist. This is a very expensive operation regardless of whether the parameter exists or not.
Types ¶
This section is empty.