http.client, fix GETs after POSTs redirects

Before this change, after a post is responded to by a 301 redirect,
the next GET had the "content-length: XX" and
"content-type: application/x-www-form-urlencoded" http headers.

Detected by running "http" test while using
squid 3.3.8 which returns a 411 error in this case.
locals-and-roots
Jon Harper 2016-02-16 14:28:59 +01:00 committed by John Benediktsson
parent e881f3d5a6
commit 4ad5071b70
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ SYMBOL: redirects
redirects get request get redirects>> < [
request get clone
response "location" header redirect-url
response code>> 307 = [ "GET" >>method ] unless
response code>> 307 = [ "GET" >>method f >>post-data ] unless
quot (with-http-request)
] [ too-many-redirects ] if ; inline recursive