MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / request_port

Function request_port

tools/python-3.11.9-amd64/Lib/http/cookiejar.py:657–669  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

655 return path
656
657def request_port(request):
658 host = request.host
659 i = host.find(':')
660 if i >= 0:
661 port = host[i+1:]
662 try:
663 int(port)
664 except ValueError:
665 _debug("nonnumeric port: '%s'", port)
666 return None
667 else:
668 port = DEFAULT_HTTP_PORT
669 return port
670
671# Characters in addition to A-Z, a-z, 0-9, '_', '.', and '-' that don't
672# need to be escaped to form a valid HTTP URL (RFCs 2396 and 1738).

Callers 3

set_ok_portMethod · 0.85
return_ok_portMethod · 0.85

Calls 2

_debugFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected