Closed bahit closed 9 years ago
That's because httpreq doesn't forward the cookies when redirecting... maybe I should fix that one time :-)
I suggest you parse the headers yourself, get the redirect location, get the cookies and use those cookies to go to that new location yourself.
See #12 for an example
I tried your example code and somehow it works, but using other test seems like the website that uses NTLM that I'm trying to access uses a 301 redirect and using the example as it is didn't quite get to the page I wanted since it stopped and didn't followed the redirect.
Looking at your code inside httpntlm.js, I noticed you used the option
for httpreq. Changing that to true, followed the redirect but some how I get a 401 error.
How can keep the authentication alive while following a redirect. (I know I'm authenticated and NTLM side working since I'm getting the redirect).