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

Method userAgentIs

rest/handler.go:1295–1298  ·  view source on GitHub ↗
(agent string)

Source from the content-addressed store, hash-verified

1293}
1294
1295func (h *handler) userAgentIs(agent string) bool {
1296 userAgent := h.rq.Header.Get(base.HTTPHeaderUserAgent)
1297 return len(userAgent) > len(agent) && userAgent[len(agent)] == '/' && strings.HasPrefix(userAgent, agent)
1298}
1299
1300// Returns true if the header exists, and its value does NOT match the given etag.
1301// (The etag parameter should not be double-quoted; the function will take care of that.)

Callers 1

writeMultipartMethod · 0.95

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected