Allow X-Requested-With with value XMLHttpRequest over XmlHttpRequest by samsonasik · Pull Request #109 · samsonasik/ErrorHeroModule · GitHub
Skip to content

Allow X-Requested-With with value XMLHttpRequest over XmlHttpRequest#109

Merged
samsonasik merged 6 commits into
masterfrom
use-modern
Jan 8, 2026
Merged

Allow X-Requested-With with value XMLHttpRequest over XmlHttpRequest#109
samsonasik merged 6 commits into
masterfrom
use-modern

Conversation

@samsonasik

@samsonasik samsonasik commented Jan 8, 2026

Copy link
Copy Markdown
Owner

@samsonasik samsonasik marked this pull request as draft January 8, 2026 16:26
@codecov-commenter

codecov-commenter commented Jan 8, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects the value of the X-Requested-With header from XmlHttpRequest to XMLHttpRequest to align with the standard convention used by JavaScript libraries like jQuery. The change ensures proper detection of AJAX requests.

  • Updates the header value check in the middleware from XmlHttpRequest to XMLHttpRequest
  • Updates corresponding test cases to use the corrected header value

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Middleware/Mezzio.php Updates the X-Requested-With header value check from 'XmlHttpRequest' to 'XMLHttpRequest'
spec/Middleware/MezzioSpec.php Updates four test cases to use the corrected 'XMLHttpRequest' header value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samsonasik

Copy link
Copy Markdown
Owner Author

@samsonasik samsonasik changed the title Use more modern XMLHttpRequest over XmlHttpRequest Allow more modern XMLHttpRequest over XmlHttpRequest Jan 8, 2026
@samsonasik samsonasik changed the title Allow more modern XMLHttpRequest over XmlHttpRequest Allow XMLHttpRequest X-Requested-With value over XmlHttpRequest Jan 8, 2026
@samsonasik samsonasik changed the title Allow XMLHttpRequest X-Requested-With value over XmlHttpRequest Allow X-Requested-With with value XMLHttpRequest over XmlHttpRequest Jan 8, 2026
@samsonasik samsonasik marked this pull request as ready for review January 8, 2026 19:30
@samsonasik samsonasik merged commit ec6a8e0 into master Jan 8, 2026
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.

3 participants