470,572 Members | 2,091 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,572 developers. It's quick & easy.

Host: header


I have a problem with a request url,for example, I have the code below,

import httplib

conn = httplib.HTTPConnection("")
conn.request("GET", "/")
r1 = conn.getresponse()
if r1.status == 200:
result = 0
except Exception:
result = -1
but the server on accept virtual host request only.
That's to say, I need to specify a "Host:" header in the request.
How to do it? thanks.

Jun 27 '08 #1
0 775

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Jeff | last post: by
2 posts views Thread by Jeff S | last post: by
5 posts views Thread by Pietro | last post: by
reply views Thread by =?Utf-8?B?UmljaGFyZCBDb2xsZXR0ZQ==?= | last post: by
2 posts views Thread by suchismita.83 | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.