Skip to content
Closed

AI junk #6108

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ def run(
sn_host = sn_port = None

if server_name:
sn_host, _, sn_port = server_name.partition(":")
sn_host, _, sn_port = server_name.rpartition(":")
if not _:
sn_host, sn_port = sn_port, None

if not host:
if sn_host:
Expand Down
2 changes: 1 addition & 1 deletion src/flask/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def session_transaction(
app.session_interface.save_session(app, sess, resp)

self._update_cookies_from_response(
ctx.request.host.partition(":")[0],
ctx.request.host.rpartition(":")[0] or ctx.request.host,
ctx.request.path,
resp.headers.getlist("Set-Cookie"),
)
Expand Down
Loading