Skip to content

Fix: handle client-side meta refresh redirects #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025

Conversation

aliyanishfaq
Copy link
Contributor

Fixes the "Redirecting..." response issue by adding support for HTML meta refresh redirects in mcpdoc/main.py.

  • Parses <meta http-equiv="refresh"> tags to follow client-side redirects
  • Consistent with existing --follow-redirects flag behavior
  • Resolves cases where documentation sites use meta refresh instead of HTTP redirects

Modified: mcpdoc/main.py

mcpdoc/main.py Outdated

# Check for meta refresh tag which indicates a client-side redirect
match = re.search(
r'<meta http-equiv="refresh" content="[^;]+;\s*url=([^"]+)"',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to incorporate allowed_domains and follow redirects into this code branch

@eyurtsev eyurtsev self-assigned this Jul 22, 2025
@eyurtsev eyurtsev merged commit a429dc7 into main Jul 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants