Skip to content

fix: enable redirection to a relative path#168

Merged
azu merged 1 commit intotextlint-rule:masterfrom
ajfAfg:fix/redirect-to-relative-path
Dec 21, 2025
Merged

fix: enable redirection to a relative path#168
azu merged 1 commit intotextlint-rule:masterfrom
ajfAfg:fix/redirect-to-relative-path

Conversation

@ajfAfg
Copy link
Contributor

@ajfAfg ajfAfg commented Dec 21, 2025

Background

When an HTTP response was in the 3xx series, this rule previously sent an HTTP request to the Location header value. Consequently, when the Location header value was a relative path, the HTTP request was not sent to the expected URI.

Approach

I modified the behavior to resolve the URI in the Location header value using the origin of the URI that sent the initial HTTP request. Additionally, to demonstrate that this change works as expected, I added an implementation on the test server and corresponding test cases.

@azu azu added the Type: Feature New Feature label Dec 21, 2025
@azu azu merged commit f583765 into textlint-rule:master Dec 21, 2025
6 checks passed
@ajfAfg ajfAfg deleted the fix/redirect-to-relative-path branch December 21, 2025 11:42
@github-actions github-actions bot mentioned this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants