File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,12 @@ def __init__(self, raw_response):
53
53
super ().__init__ ()
54
54
self .status_code = raw_response .status_code
55
55
self .text = raw_response .text
56
- self .headers = { # Only keep the headers which ThrottledHttpClient cares about
57
- k : v for k , v in _get_headers (raw_response ).items ()
58
- if k .lower () == RetryAfterParser .FIELD_NAME_LOWER
56
+ self .headers = {
57
+ k .lower (): v for k , v in _get_headers (raw_response ).items ()
58
+ # Attempted storing only a small set of headers (such as Retry-After),
59
+ # but it tends to lead to missing information (such as WWW-Authenticate).
60
+ # So we store all headers, which are expected to contain only public info,
61
+ # because we throttle only error responses and public responses.
59
62
}
60
63
61
64
## Note: Don't use the following line,
You can’t perform that action at this time.
0 commit comments