According to the documentation, these two sections of code should be
equivalent:

  conn = httplib.HTTPSConnection(host)
  conn.putrequest("POST", url)
  conn.putheader("Proxy-Authorization", myProxy)
  conn.putheader("Content-Length", "%d" % len(body))
  conn.endheaders()
  conn.send(body)

vs

  headers = { "Proxy-Authorization": myProxy }
  conn = httplib.HTTPSConnection(host)
  conn.request("POST", url, body, headers)

And yet they are not.  The first section works, but I get an
"HTTP/1.1 401 Unauthorized" error from the second.

Anyone know why?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gor...@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to