forked from extern/httpie-cli
Remove the default 30-second connection timeout limit
This commit is contained in:
parent
e93de1fbe7
commit
05fc9c480a
@ -9,6 +9,7 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_.
|
|||||||
`2.0.0-dev`_ (unreleased)
|
`2.0.0-dev`_ (unreleased)
|
||||||
-------------------------
|
-------------------------
|
||||||
* Removed Python 2.7 support (`EOL Jan 2020 <https://www.python.org/dev/peps/pep-0373/>`_).
|
* Removed Python 2.7 support (`EOL Jan 2020 <https://www.python.org/dev/peps/pep-0373/>`_).
|
||||||
|
* Removed the default 30-second connection ``--timeout`` limit.
|
||||||
* Removed Python’s default limit of 100 response headers.
|
* Removed Python’s default limit of 100 response headers.
|
||||||
* Added ``--max-headers`` to allow setting the max header limit.
|
* Added ``--max-headers`` to allow setting the max header limit.
|
||||||
|
|
||||||
|
@ -1576,8 +1576,8 @@ expecting that the request body will be passed through.
|
|||||||
And since there's no data nor ``EOF``, it will be stuck. So unless you're
|
And since there's no data nor ``EOF``, it will be stuck. So unless you're
|
||||||
piping some data to HTTPie, this flag should be used in scripts.
|
piping some data to HTTPie, this flag should be used in scripts.
|
||||||
|
|
||||||
Also, it might be good to override the default ``30`` second ``--timeout`` to
|
Also, it might be good to set a connection ``--timeout`` limit to prevent
|
||||||
something that suits you.
|
your program from hanging if the server never responds.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -526,11 +526,15 @@ network.add_argument(
|
|||||||
network.add_argument(
|
network.add_argument(
|
||||||
'--timeout',
|
'--timeout',
|
||||||
type=float,
|
type=float,
|
||||||
default=30,
|
default=0,
|
||||||
metavar='SECONDS',
|
metavar='SECONDS',
|
||||||
help="""
|
help="""
|
||||||
The connection timeout of the request in seconds. The default value is
|
The connection timeout of the request in seconds.
|
||||||
30 seconds.
|
The default value is 0, i.e., there is no timeout limit.
|
||||||
|
This is not a time limit on the entire response download;
|
||||||
|
rather, an error is reported if the server has not issued a response for
|
||||||
|
timeout seconds (more precisely, if no bytes have been received on
|
||||||
|
the underlying socket for timeout seconds).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user