Skip to content

Commit 79242e4

Browse files
committed
httpserver: update docstrings of url_for method
This needs to be made a bit more exact, added note about IPv6 and TLS.
1 parent d505f17 commit 79242e4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pytest_httpserver/httpserver.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,11 @@ def url_for(self, suffix: str):
654654
This basically means that it prepends the string ``http://$HOST:$PORT/`` to the `suffix` parameter
655655
(where $HOST and $PORT are the parameters given to the constructor).
656656
657+
When host is an IPv6 address, the required square brackets will be added
658+
to it, forming a valid URL.
659+
660+
When SSL or TLS is in use, the protocol of the returned URL will be ``https``.
661+
657662
:param suffix: the suffix which will be added to the base url. It can start with ``/`` (slash) or
658663
not, the url will be the same.
659664
:return: the full url which refers to the server

0 commit comments

Comments
 (0)