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

Support more content types for Triple protocol #13387

Merged
merged 63 commits into from
Dec 16, 2023

Conversation

namelessssssssssss
Copy link
Contributor

@namelessssssssssss namelessssssssssss commented Nov 20, 2023

What is the purpose of the change

This PR can provide the capacity to decode more HTTP Content-Types for providers.

Brief changelog

Add more HttpMessageCodec to support followding content type:

  • multipart/formdata
  • text/plain
  • application/x-www-form-urlencoded
  • application/xml

#13386

The HTTP response is now encoded based on the HTTP headers (accept & grpc-accept-encoding), rather than being limited to JSON or PB.

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a53228d) 40.40% compared to head (1709ab0) 40.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##              3.3   #13387      +/-   ##
==========================================
- Coverage   40.40%   40.18%   -0.23%     
==========================================
  Files        1807     1815       +8     
  Lines       75867    76040     +173     
  Branches    10642    10662      +20     
==========================================
- Hits        30657    30559      -98     
- Misses      40911    41180     +269     
- Partials     4299     4301       +2     

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

Copy link
Contributor

Choose a reason for hiding this comment

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

why add this class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's currently used for determine if a HttpCodecFactory supports certain media type when encoding/decoding (because some codec does not support encoding, or need some special operations to judge).
I will remove this class later, use two interface HttpMessageEncoder and HttpMessageDecoder to determine a factory supports encode or decode.

Copy link

sonarcloud bot commented Dec 15, 2023

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

19 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@AlbumenJ AlbumenJ merged commit 6118aa5 into apache:3.3 Dec 16, 2023
11 of 13 checks passed
@crazyStar00
Copy link
Contributor

crazyStar00 commented Apr 12, 2024

form-data is bad;multipart/formdata、text/plain、application/x-www-form-urlencoded is ok
image

@oxsean
Copy link
Collaborator

oxsean commented Apr 12, 2024

What version? you can create a separate bug ticket.
@crazyStar00

@crazyStar00
Copy link
Contributor

What version? you can create a separate bug ticket. @crazyStar00

dubbo version: 3.3.0-beta.2

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.

None yet

7 participants