This repository was archived by the owner on Jul 24, 2023. It is now read-only.
Commit 523c674
committed
tests: set all fetch() params in test_redirect_limit
The default values of body and headers ought to be "nil", but in fact
they end up as the string "0" in test_redirect_limit.
This causes all sorts of problems. When body is defined as "0", we
follow the conditional that leads us to conn.request_post instead of
conn.request_get, and request_post crashes since it expects a key-value
string instead of simply "0". The unexpected string for the headers
variable wreaks havoc as well; when headers is "0", the hash value
assignment at the beginning of fetch() fails, because Ruby can't convert
the string to a hash.
I'm not sure why these values are "0" instead of nil, but setting them
explicitly during the call fixes the bug.1 parent 14160d2 commit 523c674
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
0 commit comments