Fixed Issue6312 - httplib fails with HEAD requests to pages with "transfer-encoding: chunked"
diff --git a/Doc/library/httplib.rst b/Doc/library/httplib.rst
index 3725933..8390087 100644
--- a/Doc/library/httplib.rst
+++ b/Doc/library/httplib.rst
@@ -560,6 +560,22 @@
>>> data2 = r2.read()
>>> conn.close()
+Here is an example session that uses ``HEAD`` method. Note that ``HEAD`` method
+never returns any data. ::
+
+
+ >>> import httplib
+ >>> conn = httplib.HTTPConnection("www.python.org")
+ >>> conn.request("HEAD","/index.html")
+ >>> res = conn.getresponse()
+ >>> print res.status, res.reason
+ 200 OK
+ >>> data = res.read()
+ >>> print len(data)
+ 0
+ >>> data == ''
+ True
+
Here is an example session that shows how to ``POST`` requests::
>>> import httplib, urllib