Merge pull request #119 from vbanos/max-headers

Increase the MAXHEADERS limit of http client
This commit is contained in:
Noah Levitt 2019-04-08 11:50:08 -07:00 committed by GitHub
commit 4893a8eac0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,11 @@ try:
http_client._MAXLINE = 4194304 # 4 MiB
except ImportError:
import httplib as http_client
# http_client has an arbitrary limit of 100 HTTP Headers which is too low and
# it raises an HTTPException if the target URL has more.
# https://github.com/python/cpython/blob/3.7/Lib/http/client.py#L113
http_client._MAXHEADERS = 7000
import json
import socket
import logging