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

Curl keep alive #5930

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Curl keep alive #5930

wants to merge 26 commits into from

Conversation

gearama
Copy link
Member

@gearama gearama commented Aug 20, 2024

closes #5877

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • C++ Guidelines
  • Doxygen docs
  • Unit tests
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

@gearama gearama marked this pull request as ready for review August 26, 2024 21:57
@RickWinter
Copy link
Member

Does this fix address issue 5877

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
@LarryOsterman
Copy link
Member

I have a few comments, but my biggest concern is that we don't have any tests which validate this code against an actual server which returns keep-alive responses, thus there may be assumptions being made in this implementation which are not supported in actual practice.

Do we know if storage or other servers we use returns keep-alive headers which we could use to help test?

@gearama
Copy link
Member Author

gearama commented Sep 4, 2024

I have a few comments, but my biggest concern is that we don't have any tests which validate this code against an actual server which returns keep-alive responses, thus there may be assumptions being made in this implementation which are not supported in actual practice.

Do we know if storage or other servers we use returns keep-alive headers which we could use to help test?

since i agree with this statement, i don't think we should merge this change, even if on surface it might look ok, i'd rather not merge it since we cannot get real life validation of the approach. as such i'll leave it there if someone else wants to take a stab. Also since my vacation is coming up i don't want to merge something of this impact and then vanish for a few weeks.
Please leave a comment if you agree.

return response;
}

// Check if the server supports keep alive and if the headers are consistent between the request and
// the response. If they are not consistent, the keep alive header in the request is removed.and the
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// the response. If they are not consistent, the keep alive header in the request is removed.and the
// the response. If they are not consistent, the keep alive header in the request is removed and the

Comment on lines +426 to +428
// just in case the server sends the headers in a different case, the case sensitivity of the
// map is guaranteed for keys not values. So we need to ensure we compare the values in a case
// insensitive way.
Copy link
Member

@RickWinter RickWinter Sep 6, 2024

Choose a reason for hiding this comment

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

Nit,

Suggested change
// just in case the server sends the headers in a different case, the case sensitivity of the
// map is guaranteed for keys not values. So we need to ensure we compare the values in a case
// insensitive way.
// Case sensitivity only applies to the `Key` in the map. Thus. compare `Value` in a case insensitive manor.

{
// Can't re-used a shut down connection
// Can't re-used a shut down connection or an expired connection
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Can't re-used a shut down connection or an expired connection
// Can't re-use a shutdown connection or an expired connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants