aboutsummaryrefslogtreecommitdiff
path: root/docs/feedback.md
diff options
context:
space:
mode:
authorRasmus Dahlberg <rgdd@glasklarteknik.se>2025-01-06 13:21:47 +0100
committerRasmus Dahlberg <rgdd@glasklarteknik.se>2025-01-06 13:30:52 +0100
commit2d3b1f2cb0c05385c1702f1a7d74fa08d52c262f (patch)
tree6b5b1e9884ffb1f17629143e7c0d1bbfb1176ac1 /docs/feedback.md
parentee5c55d82ad70353e8203f6729d4325b59741bfa (diff)
fix: Ensure rate-limits are on for get-entriesmain
Backoff on 4XX and 5XX. See related issue: https://github.com/google/certificate-transparency-go/issues/898 Test manually hints: ``` $ cat srv.py from http.server import HTTPServer, BaseHTTPRequestHandler class RequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(429) self.send_header("Content-Type", "text/plain") self.end_headers() self.wfile.write(b"429 something something...") def do_POST(self): self.do_GET() def do_PUT(self): self.do_GET() def do_DELETE(self): self.do_GET() if __name__ == "__main__": server_address = ('localhost', 9090) httpd = HTTPServer(server_address, RequestHandler) print("Server running on http://localhost:9090") httpd.serve_forever() ``` And a transport for http.Client that redirects to localhost: ``` type statusRR struct { inner http.RoundTripper } func (s *statusRR) RoundTrip(req *http.Request) (*http.Response, error) { if strings.Contains(req.URL.Path, "ct/v1/get-entries") { req.URL.Scheme = "http" req.URL.Host = "localhost:9090" } rsp, err := s.inner.RoundTrip(req) return rsp, err } ```
Diffstat (limited to 'docs/feedback.md')
0 files changed, 0 insertions, 0 deletions