]> git.arvados.org - arvados.git/commit
21901: Log all keep-web GET requests that request the first byte
authorBrett Smith <brett.smith@curii.com>
Mon, 19 Aug 2024 21:34:25 +0000 (17:34 -0400)
committerBrett Smith <brett.smith@curii.com>
Mon, 19 Aug 2024 21:34:25 +0000 (17:34 -0400)
commit93f52b8ce9975a51eb5bbe29ad28c691c1c1a935
tree527d0ce6f04772f2a98aae6fe51f7d9c8ff7959e
parent855330cad90d3535b5f0340de445db2a13a17269
21901: Log all keep-web GET requests that request the first byte

We use this as a heuristic for "starting a new download." This heuristic
does mean that a GET request can avoid being logged if:

* it comes from the same source address (from the server's perspective)
* it uses the same API token
* it requests Range: bytes=1-

Those conditions seem acceptably narrow for now.

The http_range module used here is effectively a public export of the
same logic used by Go's HTTP FS server. I felt like it was important to
use the same logic to avoid different outcomes in the logging logic
vs. serving logic.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
go.mod
go.sum
services/keep-web/handler.go
services/keep-web/handler_test.go