Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

HTTP Problems

membrucemembruce Posts: 5Member
I am writing an automated HTTP client for a Web. App. running on Web Logic. The app server is returning a session error when I attempt to redirect after login. I have noticed that the HTTP header is picking up redundant entries. I have replaced any security related information with '^'.

Notice the Accept-Encoding:

headers = { "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" : "http://^^^.^^^.^^^.^^^:^^^/^^^",
"Accept-Language" : "en-us",
"Accept-Encoding" : "gzip, deflate",
"User-Agent" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)",
"Host" : "^^^.^^^.^^^.^^^:^^^",
"Connection" : "Keep-Alive",
"Cache-Control" : "no-cache",
"Cookie" : "JSESSIONID=" + jSessionID }
***** The http:// before "httplib" is being added by the message board
conn = httplib.HTTPConnection("^^^.^^^.^^^.^^^:^^^")
conn.request("GET", "/^^/LoadMyTaskList1.do?ContextAction=Initialize", "", headers)
response2 = conn.getresponse()
print response2.status, response2.reason
data = response2.read()
print data
conn.close()

HTTP Snoop:

***** The http:// before "HTTP/1.1" is being added by the message board

GET /^^^/LoadMyTaskList1.do?ContextAction=Initialize HTTP/1.1
Accept-Encoding: identity
Host: "^^^.^^^.^^^.^^^:^^^"
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Cache-Control: no-cache
Referer: http://^^^.^^^.^^^.^^^:^^^/^^^
Cookie: JSESSIONID=^^^^^^^^^^^^^^^^^^^^^^^^^^^
Connection: Keep-Alive
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)

I am not an HTTP programmer so any critique is also apreshiated.

Thanks,
Bruce
Sign In or Register to comment.