Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 8th, 2004, 05:57 AM
nyffeler nyffeler is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 2 nyffeler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 53 m 49 sec
Reputation Power: 0
Question CGI with Python (on proxy with HTTPS)

Hello there

I have been trying to write a Python script which would access a CGI script
on a https server behind a proxy, and I am getting nowhere.

First, the setup:
There is a proxy, where you get when entering an URL like (domainnames
changed):
URL
(no login required)

The server I'd like to access is:
URL
resp. the cgi script
URL
(login required for both)

To access this server I wrote a script called query.py:

a) using urllib.urlopen('www.myproxy.com/server/cgi-gin/server.py'):
urlopen asks me for a username and a password and I can read the output of the cgi script. The problem is: I can not POST any arguments within this urlopen command (I usually have several fields and upload files as arguments, using cgi.FieldStorage() containing fields with 3 entries (name, filename, content of file)).

b) using urllib2.urlopen and ProxyHandler and HTTPBasicAuthHandler:
apart from the fact, that I don't really know what I am doing, it doesn't work.

c) using httplib.HTTP(host):
this worked perfectly, as long as the cgi was on a http server. When changing to https, the script doesn't work anymore (even if using httplib.HTTPS()).


Is there an easy way of doing this? I would prefer something like a) with a
working POST, or a c) with a login prompt like in a).

Thanks for any help.

Bruno

Last edited by nyffeler : April 22nd, 2004 at 03:48 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > CGI with Python (on proxy with HTTPS)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap