Commit 359d997
authored
Fix an indexing panic in compression (#578)
This guard was backwards, not only breaking the functionality it was
intended to provide, but also causing panics under certain conditions.
In this case, the haystack is the pre-existing Vary header on the
response, and the needle is "Accept-Econding".
If we are compressing a response, and there is already a Vary header on
the response, it is <= 15 bytes and does not match Accept-Encoding, this
would cause a range index error as the while statement would not provide
an effective guard.1 parent 24c0f0b commit 359d997
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments