Skip to content
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

fix: dd-trace http message compat #25021

Merged
merged 1 commit into from
Aug 14, 2024
Merged

fix: dd-trace http message compat #25021

merged 1 commit into from
Aug 14, 2024

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Aug 13, 2024

make this http incoming constructor match with node, and also handle arbitrary duplex inputs

Copy link
Member

@satyarohith satyarohith left a comment

Choose a reason for hiding this comment

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

LGTM

@devsnek devsnek merged commit fd1f823 into main Aug 14, 2024
17 checks passed
@devsnek devsnek deleted the dd-trace-compat branch August 14, 2024 07:20
marvinhagemeister added a commit that referenced this pull request Aug 18, 2024
This PR addresses a regression introduced in
#25021 that would cause the
`req.url` parameter in Node's http server to always be a single
character instead of the expected value. The regression was caused by
effectively calling `.indexOf()` on an empty string and thus passing the
wrong index for slicing.

```js
"".indexOf("/") // -> -1
request.url.slice(-1) // effectively only giving us the last character
```

Fixes #25080
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