Skip to content

Fix always-true redirect status check in HTTP handlers#53

Merged
SeanTAllen merged 1 commit intomainfrom
fix-redirect-status-check
Feb 8, 2026
Merged

Fix always-true redirect status check in HTTP handlers#53
SeanTAllen merged 1 commit intomainfrom
fix-redirect-status-check

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

Summary

The finished() method in both JsonRequesterHandler and PaginatedJsonRequesterHandler had (_status != 301) or (_status != 307), which is always true. Changed or to and so redirect responses aren't incorrectly reported as errors.

Closes #47

The condition `(_status != 301) or (_status != 307)` is a tautology —
a value can't be both 301 and 307 simultaneously, so one side is always
true. Changed to `and` so the check correctly means "neither 301 nor 307."

Closes #47
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 8, 2026
@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Feb 8, 2026
@SeanTAllen SeanTAllen merged commit 7ed8dc0 into main Feb 8, 2026
11 checks passed
@SeanTAllen SeanTAllen deleted the fix-redirect-status-check branch February 8, 2026 13:12
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 8, 2026
github-actions bot pushed a commit that referenced this pull request Feb 8, 2026
github-actions bot pushed a commit that referenced this pull request Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix always-true redirect status check in HTTP handlers

2 participants