Coldfusion 302重定向http()请求

时间:2015-05-21 15:54:43

标签: redirect coldfusion http-headers

我正在尝试使用我在coldfusion中的应用程序登录网站。它是完美的工作,直到我从网站获取数据,登录后更改其网址重定向到其他网址。 我在redirect = false请求中设置了http()。我在http请求中的应用程序为location提供了除http request "Responseheader"以外的所有内容。当我尝试手动登录网站时,location设置为POST response header重定向{ {1}}。我不明白为什么http请求无法获得location响应标头。我使用coldfusion 11 update 3和网站I试图从Microsoft IIS 7.5

获取数据

1 个答案:

答案 0 :(得分:0)

我认为您的问题是ColdFusion的cfhttp调用默认会遵循重定向。尝试将redirect=false参数添加到cfhttp调用中。然后,您应该能够在Location中看到Responseheader密钥。

在cfscript中,这将是:

httpService = new http(); 
httpService.setRedirect(false);
...
相关问题