This repository was archived by the owner on Oct 14, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 1.3.3] - 2024-08-12
9+
10+ ### Added
11+
12+ ### Changed
13+ - Avoid raising an exception when a relative url is used as redirect location.
14+
815## [ 1.3.2] - 2024-07-09
916
1017### Added
Original file line number Diff line number Diff line change 1- VERSION : str = '1.3.2 '
1+ VERSION : str = '1.3.3 '
Original file line number Diff line number Diff line change @@ -174,7 +174,10 @@ def _redirect_url(
174174 except Exception as exc :
175175 raise Exception (f"Invalid URL in location header: { exc } ." )
176176
177- if url .scheme != request .url .scheme and not options .allow_redirect_on_scheme_change :
177+ if (
178+ not url .is_relative_url and url .scheme != request .url .scheme
179+ and not options .allow_redirect_on_scheme_change
180+ ):
178181 raise Exception (
179182 "Redirects with changing schemes not allowed by default.\
180183 You can change this by modifying the allow_redirect_on_scheme_change\
You can’t perform that action at this time.
0 commit comments