Skip to content

Conversation

@eugef
Copy link
Owner

@eugef eugef commented May 1, 2025

Fixes #318

@eugef eugef requested a review from Copilot May 1, 2025 18:07
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 addresses issue #318 by fixing direct header access, ensuring that headers are accessed consistently using both the Web API and Express-style interfaces.

  • Updates test cases in both mockRequest and headers specs to validate direct header access via various methods.
  • Refactors header assignments and retrievals in lib/mockRequest.js and lib/headers.js for case‐insensitive access.

Reviewed Changes

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

File Description
test/lib/mockRequest.spec.ts Added tests for direct header access using different methods.
test/lib/headers.spec.js Updated test expectations to use standardized header casing.
lib/mockRequest.js Removed lower-casing conversion during header creation to rely on proxy behavior.
lib/headers.js Adjusted the proxy to enforce case-insensitive header access consistently.

@eugef eugef merged commit 6c3f45d into master May 1, 2025
7 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.

1.17.0 breaks header accessing from 1.16.2

2 participants