]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - trip.go
WARC
[tofuproxy.git] / trip.go
diff --git a/trip.go b/trip.go
index d4ed57205bbd8d184320dc8412ed0f9be395dce4..b217750205cf26561be27e65f47ce20bb0ef3e2c 100644 (file)
--- a/trip.go
+++ b/trip.go
@@ -1,5 +1,5 @@
 /*
-tofuproxy -- HTTP proxy with TLS certificates management
+tofuproxy -- flexible HTTP/WARC proxy with TLS certificates management
 Copyright (C) 2021 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
@@ -59,10 +59,12 @@ type Round func(
 ) (bool, error)
 
 func roundTrip(w http.ResponseWriter, req *http.Request) {
+       defer req.Body.Close()
        fifos.LogReq <- fmt.Sprintf("%s %s", req.Method, req.URL)
        host := strings.TrimSuffix(req.URL.Host, ":443")
        for _, round := range []Round{
                rounds.RoundNoHead,
+               rounds.RoundWARC,
                rounds.RoundDenySpy,
                rounds.RoundRedditOld,
                rounds.RoundHabrImage,