diff --git a/kraken/lib/src/foundation/http_client_request.dart b/kraken/lib/src/foundation/http_client_request.dart index a358855c14..067ff673b5 100644 --- a/kraken/lib/src/foundation/http_client_request.dart +++ b/kraken/lib/src/foundation/http_client_request.dart @@ -225,6 +225,14 @@ class ProxyHttpClientRequest extends HttpClientRequest { _httpHeaders.forEach(backendRequest.headers.set); _httpHeaders.clear(); + // Assign configs for backend request. + backendRequest + ..bufferOutput = bufferOutput + ..contentLength = contentLength + ..followRedirects = followRedirects + ..persistentConnection = persistentConnection + ..maxRedirects = maxRedirects; + _backendRequest = backendRequest; return backendRequest; } diff --git a/kraken/test/fixtures/GET_301 b/kraken/test/fixtures/GET_301 new file mode 100644 index 0000000000..e4f0d94ce1 --- /dev/null +++ b/kraken/test/fixtures/GET_301 @@ -0,0 +1,15 @@ +HTTP/1.1 301 Moved Permanently +Content-Type: text/html +Content-Length: 262 +Connection: keep-alive +Location: https://www.taobao.com/ +Timing-Allow-Origin: * + + + +
The requested resource has been assigned a new permanent URI.
+