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 ¶
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 ¶
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 ¶
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.