On 2009-05-13, Paul Hemans <p_hem...@hotmail.com> wrote:
> http://localhost/common/foxisapi.dll/tmsmail.x2.isapi?<PROCESS%20sync=''%20schema=''%20class='replicateApplication.getChanges'%20/>

Note the entire URL.
> So I am trying httplib I have encoded the GET request with urllib.quote

urllib would be much easier if you don't need low level control -- it will
automatically call httplib for you.

>>>> conn = httplib.HTTPConnection("localhost")
>>>> print x
> %3CPROCESS%20sync%3D%27%27%20schema%3D%27%27%20class%3D
> %27replicateApplication.getChanges%27%20/%3E
>>>> this = conn.putrequest("GET",x)

For one, x does not contain the entire request.
"/common/foxisapi.dll/tmsmail.x2.isapi?"  Should also be part of the
request; otherwise, the server doesn't know which script to call.  Your
script is requesting the QUERY_STRING instead of requesting the proper
script and handing the QUERY_STRING to it.  The report you are getting back
is likely your default top level script minus any rewrites or redirection.

If you just need the content of the request, then I suggest using urllib:

import urllib
url = 
"http://localhost/common/foxisapi.dll/tmsmail.x2.isapi?<PROCESS%20sync=''%20schema=''%20class='replicateApplication.getChanges'%20/"
content = urllib.urlopen(url).read()
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to