Increase httplib._MAXHEADERS to 256.

By default Swift increase the number of max metadata count to 90
and extra header count to 32. That mean we can put 90 metadata to
Account/Container/Object by default, when user put 90 metadata to a
Account, the Account header count is close or more than 100. The
swift client unable to access Account and get an error likes,

('Connection aborted.', HTTPException('got more than 100 headers',))

So the default _MAXHEADERS(100) won't enough.

Change-Id: I5ffc4eb5d3e1ebc3dbdd7dc69376919ae3e1c5a8
This commit is contained in:
Charles Hsu 2015-08-18 19:22:24 +08:00
parent 3c65652354
commit 4b627327c9

@ -16,7 +16,6 @@
"""
OpenStack Swift client library used internally
"""
import socket
import requests
import logging
@ -24,6 +23,7 @@ import warnings
from distutils.version import StrictVersion
from requests.exceptions import RequestException, SSLError
from six.moves import http_client
from six.moves.urllib.parse import quote as _quote
from six.moves.urllib.parse import urlparse, urlunparse
from time import sleep, time
@ -34,6 +34,9 @@ from swiftclient.exceptions import ClientException
from swiftclient.utils import (
LengthWrapper, ReadableToIterable, parse_api_response)
# Defautl is 100, increase to 256
http_client._MAXHEADERS = 256
AUTH_VERSIONS_V1 = ('1.0', '1', 1)
AUTH_VERSIONS_V2 = ('2.0', '2', 2)
AUTH_VERSIONS_V3 = ('3.0', '3', 3)