Skip to content

Conversation

@eugef
Copy link
Owner

@eugef eugef commented May 2, 2025

Fixes #320

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 fixes the behavior of request.get() when headers are set as an object. It updates tests to use the "Content-type" header, switches the header retrieval logic to use a centralized helper, and refactors header lookup in the Headers module.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/lib/mockRequest.spec.ts Updated tests to check header access using "Content-type".
lib/mockRequest.js Modified getHeader implementation to delegate to getHeaderValue.
lib/headers.js Introduced getHeaderValue and updated header lookup methods.

@eugef eugef merged commit 3e73eed into master May 2, 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.

Latest v1.17.1 update breaks ExpressJS req.get

2 participants