1
0
mirror of https://github.com/httpie/cli.git synced 2024-11-24 08:22:22 +02:00

Remove the default 30-second connection timeout limit

This commit is contained in:
Jakub Roztocil 2019-08-29 09:57:00 +02:00
parent e93de1fbe7
commit 05fc9c480a
3 changed files with 10 additions and 5 deletions

View File

@ -9,6 +9,7 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_.
`2.0.0-dev`_ (unreleased)
-------------------------
* 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.
* Added ``--max-headers`` to allow setting the max header limit.

View File

@ -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
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
something that suits you.
Also, it might be good to set a connection ``--timeout`` limit to prevent
your program from hanging if the server never responds.

View File

@ -526,11 +526,15 @@ network.add_argument(
network.add_argument(
'--timeout',
type=float,
default=30,
default=0,
metavar='SECONDS',
help="""
The connection timeout of the request in seconds. The default value is
30 seconds.
The connection timeout of the request in 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).
"""
)