fix: correct redirect parsing to use destination URL instead of status code#59
Merged
jos-felipe merged 2 commits intomainfrom Aug 24, 2025
Merged
fix: correct redirect parsing to use destination URL instead of status code#59jos-felipe merged 2 commits intomainfrom
jos-felipe merged 2 commits intomainfrom
Conversation
…s code - Fixed Config.cpp to parse tokens[2] (destination URL) instead of tokens[1] (status code) for return directives - Updated default.conf with comprehensive route configuration including redirects - Removed obsolete test files (www/test.php, www/test.py) - Added project documentation in CLAUDE.md Redirect routes now work correctly: - /old-site/ → / (301) - /legacy/ → /index.html (301)
Adedayo-Sanni
approved these changes
Aug 24, 2025
Thiagosdcavalcante
approved these changes
Aug 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes Made
parseLocationBlock()to usetokens[2](destination URL) instead oftokens[1](status code) forreturndirectiveswww/test.phpandwww/test.pyfilesCLAUDE.mdwith project guidelines and build instructionsBug Fix Details
Before:
Location: 301(incorrect - status code)After:
Location: /orLocation: /index.html(correct - destination URL)Test Results
✅ Both redirect routes tested with curl and Playwright:
/old-site/→/(301 redirect)/legacy/→/index.html(301 redirect)Test Plan