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 headers should be case insensitive #68

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

heschulz
Copy link

For remote jekins that provides all lower-case HTTP headers, the parameterized remote trigger will fail with error such as

ERROR: Remote build failed with 'AbortException' for the following reason: 'Error triggering the remote job. The header of the response has an unexpected format: 
{date=[Tue, 21 Apr 2020 02:26:47 GMT], null=[HTTP/1.1 201 Created], server=[envoy], content-length=[0], x-envoy-upstream-service-time=[15], x-content-type-options=[nosniff], location=[http://example.com/jenkins/myjenkins/queue/item/4848912/]}'.

It seems the plugin is looking for "Location" but only "location" is provided.

Copy link

@cashlalala cashlalala left a comment

Choose a reason for hiding this comment

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

LGTM.

@cashlalala cashlalala merged commit a5360bf into jenkinsci:master Apr 23, 2020
@Suryansh-Bhadouria-007
Copy link

how does this solve the issue of having lowercase 'location' in headers.Here, we are simply adding the headers to a tree-map, which does not resolve this issue.

@cashlalala
Copy link

Sorry, I have to admit I didn't look into it very carefully. Since someone issued a ticket and pushed this PR whose title seemed related to it and with tests, I thought it should be good to go.
But, just wondering, why pushed a PR which didn't solve the issue? Is is some kind of test? LOL, you got me.
Welcome to complete the PR.

@heschulz
Copy link
Author

The case-insesitvite comparator for the treemap is what solves the issue. If you build locally without that, the test will fail.

@cashlalala
Copy link

Shame on me, I shouldn't jump into conclusion too quickly without looking the code again. I've been too tired & busy recently, maybe I shouldn't be the maintainer anymore. Your work did the right thing. Please accept my apology @heschulz .

@Suryansh-Bhadouria-007
Copy link

sorry, my bad @heschulz this works just fine

@Suryansh-Bhadouria-007
Copy link

btw, @cashlalala when can we expect a release with these changes?

@heschulz
Copy link
Author

no worries @cashlalala and @Suryansh-Bhadouria-007. Glad to see the fix got in quickly. Now I'm also eagerly waiting for the next release. 😀

This pull request was closed.
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.

3 participants