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.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
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
+
8
15
## [ 1.3.2] - 2024-07-09
9
16
10
17
### 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(
174
174
except Exception as exc :
175
175
raise Exception (f"Invalid URL in location header: { exc } ." )
176
176
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
+ ):
178
181
raise Exception (
179
182
"Redirects with changing schemes not allowed by default.\
180
183
You can change this by modifying the allow_redirect_on_scheme_change\
You can’t perform that action at this time.
0 commit comments