You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if redirect code is found, send a GET request to that location if enabled via 'follow' optionif([301,302].indexOf(resp.statusCode)!=-1&&headers.location){if(count<=config.follow)returnself.send_request(++count,'GET',url.resolve(uri,headers.location),config,null,callback);elseif(config.follow>0)returncallback(newError('Max redirects reached. Possible loop in: '+headers.location));}
This code not working on cookie based server.
So I suggest my code.
// if redirect code is found, send a GET request to that location if enabled via 'follow' optionif([301,302].indexOf(resp.statusCode)!=-1&&headers.location){if(count<=config.follow){// --------------------------------------------------// must set cookievarcookies=headers['set-cookie'];if(cookies){config.base_opts.headers.Cookie=cookies[0];}// --------------------------------------------------returnself.send_request(++count,'GET',url.resolve(uri,headers.location),config,null,callback);}elseif(config.follow>0)returncallback(newError('Max redirects reached. Possible loop in: '+headers.location));}
The text was updated successfully, but these errors were encountered:
Hi, needle does not support cookies (yet), but feel free to fork away and do a pull request. I'm not sure if this code should go in the redirect logic, though.
IBM Lotus Domino system, the user authentication is handled with cookies.
If authentication is successful, the status value is HTTP 302 Redirection and 'LTPAToken' cookies returns.
If authentication fails, an HTTP 200 OK and no cookies.
I am currently certified to the proposed code is handled well, it redirects are processed normally.
Hello...
I am Heepan Kim.
First of all, thank you for sharing your code.
Original source code line 208
This code not working on cookie based server.
So I suggest my code.
The text was updated successfully, but these errors were encountered: