python - http.client.HTTPException: got more than 100 headers -


since google did not find regarding error "http.client.httpexception: got more 100 headers", created question.

>>> import http.client h >>> conn = h.httpconnection("www.coursefinders.com") >>> conn.request("head","/") >>> conn.getresponse(); traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "/usr/lib/python3.4/http/client.py", line 1148, in getresponse     response.begin()   file "/usr/lib/python3.4/http/client.py", line 376, in begin     self.headers = self.msg = parse_headers(self.fp)   file "/usr/lib/python3.4/http/client.py", line 267, in parse_headers     raise httpexception("got more %d headers" % _maxheaders) http.client.httpexception: got more 100 headers 

what exception mean , how should handle type of error? site works ok in browser.

here solution doesn't involve changing library's py files:

import httplib  # or http.client if you're on python 3 httplib._maxheaders = 1000 

just put @ top of code


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -