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: (route_online_debug)Change the appended Content-type data to overlay to ensure that the Content-type is unique #1619

Merged
merged 3 commits into from
Mar 20, 2021

Conversation

Jaycean
Copy link
Member

@Jaycean Jaycean commented Mar 19, 2021

Please answer these questions before submitting a pull request

  • Why submit this pull request?

  • Bugfix

  • New feature provided

  • Improve performance

  • Backport patches

  • Related issues


Bugfix

  • Description
    There is a bug in the use process. The user writes the Content-type to the header-params to forward the content type of the URL. The old logic uses the req.Header.Add method to generate multiple Content-type values, which leads to the failure of the forwarding request.

  • How to fix?
    use req.Header.Set To override the ·Content-type· and ensure that the value is unique。

@Jaycean Jaycean changed the title fix: Change the appended content type data to overlay to ensure that the content type is unique fix: Change the appended Content-type data to overlay to ensure that the content type is unique Mar 19, 2021
@Jaycean Jaycean changed the title fix: Change the appended Content-type data to overlay to ensure that the content type is unique fix: (route_online_debug)Change the appended Content-type data to overlay to ensure that the content type is unique Mar 19, 2021
@Jaycean Jaycean changed the title fix: (route_online_debug)Change the appended Content-type data to overlay to ensure that the content type is unique fix: (route_online_debug)Change the appended Content-type data to overlay to ensure that the Content-type is unique Mar 19, 2021
@Jaycean Jaycean force-pushed the fix_on_line_debug_validation_data branch from 7faebd7 to 2ac671f Compare March 19, 2021 01:40
@liuxiran
Copy link
Contributor

related fe pr: #1612

@codecov-io
Copy link

codecov-io commented Mar 19, 2021

Codecov Report

Merging #1619 (d84ab27) into master (f4f27d1) will decrease coverage by 9.84%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1619      +/-   ##
==========================================
- Coverage   71.77%   61.93%   -9.85%     
==========================================
  Files         133       47      -86     
  Lines        5471     3118    -2353     
  Branches      592        0     -592     
==========================================
- Hits         3927     1931    -1996     
+ Misses       1301      874     -427     
- Partials      243      313      +70     
Flag Coverage Δ
backend-e2e-test 61.93% <100.00%> (-0.03%) ⬇️
backend-e2e-test-ginkgo 48.07% <100.00%> (-0.02%) ⬇️
backend-unit-test ?
frontend-e2e-test ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...l/handler/route_online_debug/route_online_debug.go 75.92% <100.00%> (+1.41%) ⬆️
api/internal/utils/runtime/runtime.go 0.00% <0.00%> (-64.29%) ⬇️
api/internal/core/store/validate_mock.go 0.00% <0.00%> (-50.00%) ⬇️
api/internal/core/store/store.go 58.43% <0.00%> (-30.73%) ⬇️
api/internal/filter/authentication.go 47.22% <0.00%> (-30.56%) ⬇️
api/internal/handler/service/service.go 62.60% <0.00%> (-29.57%) ⬇️
api/internal/filter/ip_filter.go 48.71% <0.00%> (-23.08%) ⬇️
api/internal/handler/global_rule/global_rule.go 64.51% <0.00%> (-19.36%) ⬇️
...pi/internal/handler/plugin_config/plugin_config.go 59.57% <0.00%> (-18.09%) ⬇️
api/internal/utils/json_patch.go 44.82% <0.00%> (-13.80%) ⬇️
... and 99 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4f27d1...d84ab27. Read the comment docs.

Copy link
Member

@nic-chen nic-chen left a comment

Choose a reason for hiding this comment

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

LGTM

@Jaycean Jaycean force-pushed the fix_on_line_debug_validation_data branch from 6875168 to d84ab27 Compare March 19, 2021 08:14
@Jaycean
Copy link
Member Author

Jaycean commented Mar 19, 2021

cc @liuxiran @LiteSun @juzhiyuan FE CI Failed PTAL. Thks.

@liuxiran
Copy link
Contributor

liuxiran commented Mar 20, 2021

mark fe e2e errors:

fixed by two test commits

Copy link
Contributor

@liuxiran liuxiran left a comment

Choose a reason for hiding this comment

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

fe local test passed, LGTM

@juzhiyuan juzhiyuan merged commit 45df5b2 into apache:master Mar 20, 2021
liuxiran added a commit to liuxiran/apisix-dashboard that referenced this pull request Mar 20, 2021
…rlay to ensure that the Content-type is unique (apache#1619)

Co-authored-by: liuxiran <[email protected]>
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.

7 participants