source: TI12-security/trunk/python/Tests/m2Crypto/httpsTest.py @ 4146

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/Tests/m2Crypto/httpsTest.py@5907
Revision 4146, 798 bytes checked in by pjkersha, 12 years ago (diff)

Fixes to server setup.py for inclusion of none .py pylons container files for egg.

Line 
1#!/use/bin/env python
2from M2Crypto.httpslib import HTTPSConnection
3
4hostname = 'gabriel.badc.rl.ac.uk'
5#hostname = 'grid.bodc.nerc.ac.uk'
6path = '/openid'
7#
8#body = '''<SOAP-ENV:Envelope
9#xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
10#xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
11#xmlns:ns1="urn:ndg.security.sessionMgr">
12#<SOAP-ENV:Header></SOAP-ENV:Header>
13#<SOAP-ENV:Body><ns1:getAttCert/></SOAP-ENV:Body>'''
14
15#con = HTTPSConnection(hostname)
16#con.putrequest('POST', path)
17#con.putheader('Content-Type', 'text/xml')
18#con.putheader('Content-Length', str(len(body)))
19#con.endheaders()
20#con.send(body)
21#resp = con.getresponse()
22#print resp.read()
23
24con = HTTPSConnection(hostname)
25con.putrequest('GET', path)
26con.endheaders()
27resp = con.getresponse()
28print resp.read()
Note: See TracBrowser for help on using the repository browser.