ssamko Posted December 25, 2015 Share Posted December 25, 2015 (edited) Hello !I have a problem with getting whole header.a part of my code:#include <WinHttp.au3> #include <Array.au3> #include <String.au3> Local $login_packet = "link" $login.open("GET", $login_packet) $login.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $login.send() $login.WaitForResponse() $headers= $login.GetAllResponseHeaders() ConsoleWrite($headers) Exitthis code can get info from header of logging to unnamed page like:Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0Cache-Control: no-cache, must-revalidateConnection: Keep-AliveDate: Fri, 25 Dec 2015 21:56:29 GMTKeep-Alive: timeout=30000, max=99999Pragma: no-cacheContent-Length: 1410Content-Type: text/html; charset=utf-8Expires: Thu, 19 Nov 1981 08:52:00 GMTP3P: CP="CAO PSA OUR"Server: ApacheSet-Cookie: dosid=8f6facdee90596745777dcdd1b1548a7; path=/Set-Cookie: aid=deleted; expires=Thu, 25-Dec-2014 21:56:28 GMT; path=/Set-Cookie: aip=deleted; expires=Thu, 25-Dec-2014 21:56:28 GMT; path=/Set-Cookie: aig=deleted; expires=Thu, 25-Dec-2014 21:56:28 GMT; path=/Set-Cookie: acr=deleted; expires=Thu, 25-Dec-2014 21:56:28 GMT; path=/Set-Cookie: bptid=a11bc4807d8e485bf11ae2132f751f8a; path=/Vary: Accept-Encoding,User-AgentContent-Transfer-Encoding: 8bitX-XTM-Node: but when I sniffed headers there was 1 more item with name "location" and I dont know how to get that location.I hope u understand(sorry for my english) Edited December 25, 2015 by ssamko Link to comment Share on other sites More sharing options...
trancexx Posted December 26, 2015 Share Posted December 26, 2015 What you get is the header of the final response after all redirections have been followed. Location can't exist there.If you want "Location" then disable redirects. Only then you wouldn't get the final page. Can't be both.All in all, get familiar with HTTP protocol, at least on some basic level. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
ssamko Posted December 26, 2015 Author Share Posted December 26, 2015 I know that I dont understand it well but I need it Thnx you for your help ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now