curl-library
Help with cookie options...
Date: Mon, 28 Nov 2005 16:12:42 -0500
Hi everyone.
I currently use the javacurl implementation of libcurl. I have hit an issue
with a script that has been running for sometime that now does not perform
as it should. Basically, my script logs into a site with a digital cert,
parses some data, then passes data to a url via a HTTP Get. This worked for
several months. Well, something has been modified at the server side as my
script no longer successfully performs the specified task after logging into
the site and parsing data.
I do not receive any errors on the javacurl side as I have verbose logging
enabled so I can follow along closely as to what is going on.
The only thing I could figure out is that maybe the cookies that are being
passed back and forth need to be modified. I did look at the output of
httpHeader within I.E. and it looks like the cookie values being passed in
the browser are different than the ones being passed within javacurl. Below
are the outputs from httpHeader and javacurl. How can I modify the cookie
values being sent? I am a little confused about the usage of OPT_COOKIEFILE
and OPT_COOKIEJAR.
Any help will be greatly appreciated.
Thanks!
Blaine
########## Output from httpHeader ############
GET /sdnadmin/sdnapp/servlet/SDNServlet?activity_key=891&handler=
gov.cdc.sdn.handler.PdcaActivityRequestHandler.startProcessAll&order=Date&direction=DescendingHTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
application/x-shockwave-flash, */*
Referer:
https://sdnadmin.cdc.gov/sdnadmin/sdnapp/servlet/SDNServlet?activity_key=891&handler=gov.cdc.sdn.handler.AdminRequestHandler.start
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322; InfoPath.1)
Host: sdnadmin.cdc.gov
Connection: Keep-Alive
Cookie:
SMIDENTITY=N/T2EUPO2qHdhHyZEp//RF/9r3uLOntXyudqd+wOU61ob0A101Wtw5D4uMmODus1agtR2gduWHiTLwtmdWD/1nfli2osmx4TiYVoOoYtKYQXCwwsqWtNfi+2rlqztuvxD83Ct0PS6QoPSahx2epH0KFOBDThUoEGU2qVlbD5Ku7dxDA9t+5OPVHcvbCyM1GMPGJsJyO8iHyT8n+plTc5XbD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avaScriptTimer=896;
user_key=45960;
SDNReferrer=https%3A//sdnadmin.cdc.gov/sdnadmin/sdnapp/servlet/SDNServlet%3Factivity_key%3D891%26handler%3Dgov.cdc.sdn.handler.AdminRequestHandler.start;
JSESSIONID=DLp9p8TY6SQh1pwwkNZ5mLMv4YLlSZ41sb50GgSYCbYk1r7TjBJy!1515207141
####### Output from javacurl ###############
* About to connect() to sdnadmin.cdc.gov port 443
* Trying 158.111.1.162... * connected
* Connected to sdnadmin.cdc.gov (158.111.1.162) port 443
* SSL connection using RC4-MD5
* Server certificate:
* subject: /C=US/ST=Georgia/L=Atlanta/O=Centers for Disease Control and
Prevention/OU=NCPHI/OU=Terms of use at www.verisign.com/rpa (c)00/CN=
sdnadmin.cdc.gov
* start date: 2005-06-22 00:00:00 GMT
* expire date: 2006-06-22 23:59:59 GMT
* issuer: /C=US/O=RSA Data Security, Inc./OU=Secure Server
Certification Authority
* SSL certificate verify result: error number 1 (20), continuing anyway.
> GET /sdnadmin/sdnapp/servlet/SDNServlet?activity_key=891&handler=
gov.cdc.sdn.handler.PdcaActivityRequestHandler.startProcessAll&order=Date&direction=DescendingHTTP/1.1
Host: sdnadmin.cdc.gov
Pragma: no-cache
Accept: */*
Cookie: user_key=42078; JavaScriptTimer=900;
SMSESSION=5RhY7vFEC5sCH6LyvGRcMLw/Jxdevswzfd506HcPaNfN/u08k3pvxJCTYthAacCIIN58vj4iwZAnYmAQEbwtDPXODgsM7M/7h4VbOc1igvGH5sYRJkPL+IsHFCiz3ZAojwdauOCULKLG1fLRed8c/w5rBPIk772BGM3E/8RMfBit8MBTzuK7PJ6gusim6vv6epIlMtdnhebBX8MFuYZRRsyOKfmjdjlukUe/VssHxJrIOlg3yIvG7MvjRWuXE3Dr1d79v4CTIrahDvumed+s8PnK5UOCT99EFedciRonKfpoTTmVaDEaxKsb1ybJLZgGFdZCUkZ/O/jOgOhZdXQU03CoJ9DEpRxYs7E5OZdWCR0sKTl9DfnBy2GcpJqKGJENRQTLnq5k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