MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / FixQuotedSlashes

Function FixQuotedSlashes

rest/routing.go:482–490  ·  view source on GitHub ↗
(rq *http.Request)

Source from the content-addressed store, hash-verified

480}
481
482func FixQuotedSlashes(rq *http.Request) {
483 uri := rq.RequestURI
484 if docWithSlashPathRegex.MatchString(uri) {
485 if stop := strings.IndexAny(uri, "?#"); stop >= 0 {
486 uri = uri[0:stop]
487 }
488 rq.URL.Path = uri
489 }
490}
491
492func wouldMatch(router *mux.Router, rq *http.Request, method string) (found bool, keyspace string) {
493 savedMethod := rq.Method

Callers 2

RequestFunction · 0.85
wrapRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected