Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: cookies WinInet
I'm using TCPdump and i can see clearly that the cookie header is not being posted. Ive also noticed that although i supply my own accept header, wininet puts one of there own in there as well (both accept headers are in the request), is there anything i can do to stop this from happening?
addextender("wwint33i.dll") acc="Accept: test" lan ="Accept-Language: en" encoding="Accept-Encoding: gzip, deflate" user="User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)" host="Host: www.winbatch.com" ;length="Content-Length: 112" conn="Connection: Keep-Alive" cookie ="Cookie: test" HtmlFile="http://www.winbatch.com" url = "www.winbatch.com" myheader=strcat(acc, @crlf, lan, @crlf, encoding, @crlf, user, @crlf, cookie, @crlf, host, @crlf, conn, @crlf, cookie) message("test", myheader) TopHandle =ibegin(0,"","") conhandle=iHostConnect(TopHandle, Url ,@HTTP, "", "") datahandle=iHttpInit(conhandle, "GET", "/index.html", "",0) rslt=iHttpOpen(datahandle, Myheader, 0 , 0) xx =ireaddata(datahandle,"c:\temp.txt") ; writes whole html fileNow this is what the request looks like
GET /index.html HTTP/1.1 Accept: *.* Accept: test Accept-Language: en Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) Host: www.winbatch.com Connection: Keep-AliveThen the winbatch servers reply
HTTP/1.1 200 OK Date: Wed, 26 Jul 2000 17:27:33 GMT Server: Apache/1.2.4 Last-Modified: Fri, 26 May 2000 20:23:56 GMT ETag: "e2e15-2813-392edd5c" Content-Length: 10259 Accept-Ranges: bytes Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/htmlAs you can see my cookie header was not included and there is 2 accept headers
Article ID: W14557
Filename: Cookies Wont Go Through.txt
File Created: 2000:07:26:11:23:44
Last Updated: 2000:07:26:11:23:44