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

[confighttp] Add support for cookies #10176

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

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented May 18, 2024

Description

Add support for cookies in HTTP clients with cookies::enabled.

Link to tracking issue

Fixes #10175

Testing

Unit test

Documentation

Added to README

@atoulme atoulme requested a review from a team as a code owner May 18, 2024 07:37
@atoulme atoulme requested a review from mx-psi May 18, 2024 07:37
Copy link

codecov bot commented May 18, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 92.46%. Comparing base (31ac333) to head (a500431).

Files Patch % Lines
config/confighttp/confighttp.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10176   +/-   ##
=======================================
  Coverage   92.46%   92.46%           
=======================================
  Files         387      387           
  Lines       18246    18252    +6     
=======================================
+ Hits        16871    16877    +6     
  Misses       1028     1028           
  Partials      347      347           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

if hcs.CookiesEnabled {
jar, err = cookiejar.New(nil)
if err != nil {
return nil, err
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line cannot be tested, the New method returns nil always for now. I am just checking the error returned in case this changes in the future.

.chloggen/cookie_support.yaml Show resolved Hide resolved
config/confighttp/confighttp.go Outdated Show resolved Hide resolved
@atoulme
Copy link
Contributor Author

atoulme commented May 29, 2024

@mx-psi are we good to go?

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.

[confighttp] Support cookie sessions for sticky session cookies
2 participants