(agent string)
| 1293 | } |
| 1294 | |
| 1295 | func (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.) |