Fix POST -> GET conversion on redirect

This commit is contained in:
Rob Wu
2013-08-29 19:31:19 +02:00
parent a784fc96f8
commit d2023b45e1

View File

@@ -141,6 +141,8 @@ function onProxyResponse(req, res, response) {
res.setHeader('X-CORS-Redirect-' + requestState.redirectCount_, statusCode + ' ' + locationHeader);
req.method = 'GET';
req.headers['content-length'] = '0';
delete req.headers['content-type'];
requestState.location = parseURL(locationHeader);
// ### Dispose the current proxied request