<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -20,7 +20,9 @@ data = f.read()
 f.close()
 
 # prep HTTP PUT to upload image
-h = httplib.HTTP(&quot;upload.smugmug.com&quot;)
+#h = httplib.HTTP(&quot;upload.smugmug.com&quot;)
+h = httplib.HTTPConnection(&quot;upload.smugmug.com&quot;)
+h.connect()
 h.putrequest('PUT', &quot;/&quot; + filename)
 print(&quot;Content-Length: %s&quot; % str(len(data)))
 print(&quot;Content-MD5: %s&quot; % hashlib.md5(data).hexdigest())
@@ -41,9 +43,9 @@ h.endheaders()
 h.send(data)
 
 # response output
-errcode, errmsg, headers = h.getreply()
-print(&quot;%s: %s - %s&quot; % (errcode, errmsg, str(headers)))
-result = h.file.read()
+resp = h.getresponse()
+print(&quot;%s: %s&quot; % (resp.status, resp.reason))
+result = resp.read()
 h.close()
 print(&quot;PUT: result: %s&quot; % result)
 </diff>
      <filename>testupload.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7ada657df01bc4787293451840a5e14567346b6c</id>
    </parent>
  </parents>
  <author>
    <name>jesus m rodriguez</name>
    <login></login>
    <email>jesusr@redhat.com</email>
  </author>
  <url>http://github.com/jmrodri/sm-photo-tool/commit/fbaf96c1ec64b65c91b75e1b01dab53866ba3cfb</url>
  <id>fbaf96c1ec64b65c91b75e1b01dab53866ba3cfb</id>
  <committed-date>2009-10-30T18:26:04-07:00</committed-date>
  <authored-date>2009-10-30T18:26:04-07:00</authored-date>
  <message>figured out how to use httplib correctly.</message>
  <tree>e1d1936fdf2ec75b07f3a91e75773ff64831f643</tree>
  <committer>
    <name>jesus m rodriguez</name>
    <login></login>
    <email>jesusr@redhat.com</email>
  </committer>
</commit>
