Commit 4697249
committed
Fix: Set --post302
cURL resets the real method type from POST to GET on redirects. This
means that a protocol upgrade or generic redirect from Scarf.sh will
cause the telemetry upload to downgrade from a POST with a body to what
should be a GET, but what old cURL will treat as a POST without a body
due to the presence of the -X flag.
Very new cURLs have a flag which repairs this particular behavior, and
the RFC compliant thing would be to move from the ambiguous HTTP 302 to
the specific HTTP 307 which preserves method type. But we have tons of
ancient clients out there and the vendor may not be willing to fix their
redirects so we have to set the feature flag which tells cURL to do the
standard defined thing rather than the common implementation defined
thing. Computers are great.1 parent ca8f6e1 commit 4697249
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
| |||
0 commit comments