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: StandardHttpClient sends Expect 100-continue header value #4766

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

manusa
Copy link
Member

@manusa manusa commented Jan 13, 2023

Description

Relates to #4735 (might fix it)

fix: StandardHttpClient sends Expect 100-continue header value

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

Signed-off-by: Marc Nuri <marc@marcnuri.com>
@manusa
Copy link
Member Author

manusa commented Jan 13, 2023

@shawkins FYI, the JDK client sends the "wrong" header value (at least on OpenJDK, but the official Javadocs aren't very relieving)

@sonarcloud
Copy link

sonarcloud bot commented Jan 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@shawkins
Copy link
Contributor

Indeed https://github.com/openjdk/jdk/blob/master/src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java#L536

And you confirmed that the api server does require the case sensitive value? Maybe @maxandersen can push through another jdk fix.

@manusa
Copy link
Member Author

manusa commented Jan 13, 2023

Indeed https://github.com/openjdk/jdk/blob/master/src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java#L536

And you confirmed that the api server does require the case sensitive value? Maybe @maxandersen can push through another jdk fix.

No, sorry, I haven't confirmed yet that changing the header value fixes it.

@manusa
Copy link
Member Author

manusa commented Jan 13, 2023

👍 Confirmed, JKube's oc:build works again once the header is sent with the correct value 100-continue.

@manusa manusa added this to the 6.4.0 milestone Jan 13, 2023
@manusa
Copy link
Member Author

manusa commented Jan 13, 2023

I'm merging this one, we should probably discuss what to do with the JDK implementation.

@manusa manusa merged commit d6bde32 into fabric8io:master Jan 13, 2023
@manusa manusa deleted the fix/expect-continue branch January 13, 2023 14:43
@shawkins
Copy link
Contributor

@manusa reviewing this more, the burden of the fix should be in the underlying go library: golang/go#57824

If for whatever reason that is not possible, we can push for a jdk change.

@manusa
Copy link
Member Author

manusa commented Jan 17, 2023

This is more aligned with what I remember about the header value. However, I think both sides would benefit from the fix.

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