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 for "Invalid cookie header"-warning using HttpClient and Bitbucket Server Interaction #791

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

rickard-n
Copy link
Contributor

I've identified an issue in the HttpClient configuration when interacting with Bitbucket Server. Encountering a warning: "WARNING ... processCookies: Invalid cookie header." This warning is triggered during the cookie parsing process, which seems to be incompatible with the cookie formats sent by Bitbucket Server.

Initially, I considered changing the default cookie specification to CookieSpecs.STANDARD to address this compatibility issue. However, I realized that this might not be the most efficient solution. Current code seems to create a new cookie store for each request.

Therefore, to simplify the HTTP interactions and eliminate the warning, I've opted to deactivate cookie handling in the HttpClient when interacting with Bitbucket Server. By disabling cookie management, we not only avoid the warning but also prevent other cookie-related problems.

Please review the changes and let me know if you have any concerns or if further adjustments are required.

Your checklist for this pull request

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates feature works or fixes the issue.

@lifeofguenter
Copy link
Contributor

Thanks! Looks good to me - I can not imagine cookies being needed at all?

@lifeofguenter lifeofguenter added enhancement java Pull requests that update Java code labels Dec 20, 2023
@lifeofguenter lifeofguenter merged commit dea7dcd into jenkinsci:master Jan 16, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants