ThreeMammals / Ocelot

.NET API Gateway
https://www.nuget.org/packages/Ocelot
MIT License
8.24k stars 1.62k forks source link

In C#, when using Ocelot, the ContentLength is 0 when forwarding data to downstream services. #2077

Closed Tell969696 closed 1 month ago

Tell969696 commented 1 month ago

Expected Behavior / New Feature

Using Ocelot version 18.0, in an ABP framework environment, the content length of front-end access is normal when using app.Use. However, when inspecting the information forwarded by Ocelot in a DelegatingHandler, the content length is 0.

Actual Behavior / Motivation for New Feature

Steps to Reproduce the Problem

1. 1. 1.

Specifications

raman-m commented 1 month ago

Use POST verb to forward body successfully. But I believe it is possible with GET too. There is problem with multiplexing aka Request Aggregation feature where we have the problem with forwarding body. But the problem is already addressed in PR #2050 and merged as commit https://github.com/ThreeMammals/Ocelot/commit/233f87a43f5e2fbb1857f17bb6181fbd05de03bc. So, our recommendation is migration to version 23.3 which will be released in a week.

Using Ocelot version 18.0

This is outdated version! Migrate to latest version 23.2.2 please!

P.S.

If you have custom overrides of the default Ocelot implementations then we are not responsible for the stability. Overrides such as: custom delegating handlers, custom middlewares, custom replaced services in DI. So, we can't help you!