Skip to content

Conversation

@samsonasik
Copy link
Owner

@samsonasik samsonasik commented Jan 8, 2026

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

codecov-commenter commented Jan 8, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.64%. Comparing base (0011b99) to head (12395f2).
⚠️ Report is 7 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #109   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files          18       18           
  Lines         296      296           
=======================================
  Hits          292      292           
  Misses          4        4           
Flag Coverage Δ
tests 98.64% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

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
Owner Author

Tested with jQuery, which seems using XMLHttpRequest already.

@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