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 "Invalid cookie header" warnings #343

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

offa
Copy link
Contributor

@offa offa commented Jul 28, 2023

Each status update sent to Bitbucket issues a warning in the Jenkins log:

Invalid cookie header: "Set-Cookie: […]". Invalid 'expires' attribute: […]

This PR fixes the issue.

Testing done

Verified on a Jenkins instance.

Submitter checklist

Preview Give feedback

@offa
Copy link
Contributor Author

offa commented Aug 21, 2023

@sghill could you have a look at this? :-)

@sghill
Copy link
Contributor

sghill commented Aug 21, 2023

@offa is it possible to add a test that verifies this behavior? MockServer or similar may be useful here

@offa
Copy link
Contributor Author

offa commented Aug 21, 2023

Thanks, I'll have a look at it!

@@ -530,7 +531,8 @@ protected CloseableHttpClient getHttpClient(PrintStream logger, Run<?, ?> run, S
RequestConfig.Builder requestBuilder = RequestConfig.custom()
.setSocketTimeout(timeoutInMilliseconds)
.setConnectTimeout(timeoutInMilliseconds)
.setConnectionRequestTimeout(timeoutInMilliseconds);
.setConnectionRequestTimeout(timeoutInMilliseconds)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to usage search, the function isn't used anymore and deprecated. Thus, instead of adding tests to these changes, I can drop them. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems low risk so I think we can leave it. If there is an issue we can revert.

@offa offa requested a review from a team as a code owner August 22, 2023 16:03
@offa
Copy link
Contributor Author

offa commented Aug 22, 2023

@sghill Test added (for the not-deprecated version; see comments above).

@sghill sghill added the bug label Aug 22, 2023
@@ -530,7 +531,8 @@ protected CloseableHttpClient getHttpClient(PrintStream logger, Run<?, ?> run, S
RequestConfig.Builder requestBuilder = RequestConfig.custom()
.setSocketTimeout(timeoutInMilliseconds)
.setConnectTimeout(timeoutInMilliseconds)
.setConnectionRequestTimeout(timeoutInMilliseconds);
.setConnectionRequestTimeout(timeoutInMilliseconds)
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems low risk so I think we can leave it. If there is an issue we can revert.

@sghill sghill merged commit 2023583 into jenkinsci:release/1.x Aug 22, 2023
@offa offa deleted the invalid_cookie_header branch August 22, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants