Seems to me that I've send the reply only to Chris. For others only the short version (as I'm on my mobile and can't find the previous mesage): 1) login to cosign (Chris has done it) 2) send GET request to server and follow redirects 3) send POST request to server
And you muse receive/send all the cookies... Lukas ----- Puvodní zpráva ----- Od: Chris Poole <[email protected]> Odesláno: 27. ledna 2011 16:27 Komu: [email protected] <[email protected]> Predmet: [Cosign-discuss] Send HTTP POST to cosign-protected page? Hi, I am a user of a cosign system, not admin. I'm wanting to use HTTP POST method to send data to a page, which is behind my institution's cosign system. In a browser, I visit the page which redirects me to the cosign login page. I can then sign in and do what I want on the original page. I'd like to do this in a script (python with httplib2), to save myself time. I first try a HTTP GET method, to get the cosign cookie. I authenticate myself in the script, and get these headers: {'status': '200', 'content-location': 'https://weblogin.mydomain/?cosign-www&http://www.pageIWant.php', 'transfer-encoding': 'chunked', 'set-cookie': 'cosign=JmsebQHs796n+hA0v0JIISy535UwR8KdR7lPKxj1WVYwfxAvpxO0GecojpaB/1296135799; path=/; secu re', 'expires': 'Mon, 16 Apr 1973 13:10:00 GMT', 'server': 'Apache', 'last-modified': 'Mon, 16 Apr 1973 13:10:0 0 GMT', 'pragma': 'no-cache', 'cache-control': 'no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0', 'date': 'Thu, 27 Jan 2011 13:43:19 GMT', 'content-type': 'text/html; charset=ISO-8859-1'} If I then try to use HTTP POST to send data to "pageIWant.php", I get the following headers: {'status': '302', 'content-length': '300', 'server': 'Apache', 'location': 'https://weblogin.mydomain/cosign /post_error.html', 'date': 'Thu, 27 Jan 2011 13:43:54 GMT', 'content-type': 'text/html; charset=iso-8859-1'} Is what I want to do not possible? Or am I going about it the wrong way? Thanks for any help. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Cosign-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cosign-discuss ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Cosign-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cosign-discuss
