p2: fence document tags, atomic fleetctx, harden workspace

Neutralise </document and <document in page text. Counters are
atomic.Uint64. Workspace names are [A-Za-z0-9_-] and PathEscaped;
foreign workspace_id rows are dropped. Wayback closest.url must be
https://web.archive.org. archive.today snapshot_at is Memento-Datetime
or null.
This commit is contained in:
2026-09-23 00:01:04 -07:00
parent 2f9d3d97e6
commit ff87a04f94
8 changed files with 149 additions and 17 deletions
+2
View File
@@ -27,6 +27,7 @@ type Resource struct {
FinalURL string
Status int
ContentType string
Header http.Header
Body []byte
FetchedAt time.Time
Hash string
@@ -141,6 +142,7 @@ func (f *Fetcher) Fetch(ctx context.Context, rawURL string) (*Resource, error) {
FinalURL: final,
Status: resp.StatusCode,
ContentType: ct,
Header: resp.Header.Clone(),
Body: body,
FetchedAt: time.Now().UTC(),
}