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

HTTP API oddity #22

Open
ianrrees opened this issue Nov 19, 2022 · 0 comments
Open

HTTP API oddity #22

ianrrees opened this issue Nov 19, 2022 · 0 comments

Comments

@ianrrees
Copy link

I'm not sure if this is actually a problem, but wanted to make a note to look at this before finishing up with the Mongoose 7.7 upgrade.

In the static MongooseHttpClient::eventHandler(), the requests's MongooseHttpClientRequest::_client field is used to reference back to the client associated with the request. But, that _client field is only set in the MongooseHttpClientRequest ctor, and it's not checked in MongooseHttpClient::send(). It might be possible for a request to be sent through a different client than it was originally constructed with. Not sure if that's really a problem, but it seems like a potential source of weird bugs.

One fix might be to move the public send() method over to the request, since it already has an associated client.

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

No branches or pull requests

1 participant