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

request body size #914

Closed
RedzRedz opened this issue Jun 5, 2019 · 12 comments
Closed

request body size #914

RedzRedz opened this issue Jun 5, 2019 · 12 comments
Assignees
Labels
bug Identified as a potential bug question Initially seen a question could become a new feature or bug or closed ;)

Comments

@RedzRedz
Copy link

RedzRedz commented Jun 5, 2019

Is the ocelet has the limitation of request body size?
I have api to upload file, the file size less than 20MB, the ocelet is ok.when the file size bigger, the ocelet will reponse 404.

@ks1990cn
Copy link
Contributor

Hi @RedzRedz
~30 MB, Depends on what server you are hosting and you can customize this value.

We are fixing 404 to 413 which is correct error for large payload.

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.core.kestrelserverlimits.maxrequestbodysize?view=aspnetcore-7.0

@raman-m
Copy link
Member

raman-m commented Oct 30, 2023

@ks1990cn How are you fixing it? What's PR number?

@ks1990cn
Copy link
Contributor

I raised that PR but @ggnaegi have right way to do so he discussed that he will be working on it.

So i deleted my PR.

@raman-m
Copy link
Member

raman-m commented Oct 31, 2023

@ggnaegi Tanmay said that you're working on this. Which PR?

@raman-m raman-m added the bug Identified as a potential bug label Oct 31, 2023
@ggnaegi
Copy link
Member

ggnaegi commented Oct 31, 2023

@raman-m Yes, I'm finishing it and I will push it. Maybe we should add some documentation here, as @ks1990cn pointed out, it's a server related issue:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.core.kestrelserverlimits.maxrequestbodysize?view=aspnetcore-7.0
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.iisserveroptions.maxrequestbodysize?view=aspnetcore-7.0
From our side, we are hidding the 413 status code with the ocelot error handling.

@raman-m
Copy link
Member

raman-m commented Oct 31, 2023

@ggnaegi we have to add docs to explain developer how to config and how to use Ocelot pipeline to avoid such ugly bugs in future.
Regarding hiding 413 status. We can provide a small bug fix with good initial approach to understand the whole picture on error handling in Ocelot. In my opinion, error handling should be redesigned. But Ocelot could provide extra status in additional header, not overriding original status code.

@ggnaegi
Copy link
Member

ggnaegi commented Oct 31, 2023

@raman-m we should think about a custom Exception class and only one middleware handling the exceptions and returning a response in rfc 7807 format.

@raman-m
Copy link
Member

raman-m commented Nov 25, 2023

A long discussion! And there is no PR...
The author created this Question-issue on Jun 5, 2019 more that 4 years ago. And the author doesn't care about this issue anymore...
His profile is empty! Only a couple of forked repos...
He is ghost GitHub user. And he is not open source contributor... 🤔

What are we discussing here?
Seems we need to convert this issue to discussion... or close it finally.

@raman-m raman-m added the question Initially seen a question could become a new feature or bug or closed ;) label Nov 25, 2023
@raman-m
Copy link
Member

raman-m commented Jan 21, 2024

@RedzRedz

But file downloading & uploading is fixed by #1724 and #1824 in Ocelot

@raman-m raman-m closed this as completed Jan 21, 2024
@alexandis
Copy link

alexandis commented Jan 25, 2024

But file downloading & uploading is fixed by #1724 and #1824 in Ocelot

I've tried to find any information "how" is that fixed? Where should I read, what should I change in the configuration? :) Please clarify. Because I have not found other way to fix that, but adding <requestLimits maxAllowedContentLength="XXXX" /> into applicationhost.config. Which is not very nice...

@ggnaegi
Copy link
Member

ggnaegi commented Jan 25, 2024

@alexandis Well, you are using IIS. #1724 and #1824 will be integrated in the next Release, probably during the next few weeks. If you want to try on your own, you could compile the sources from the develop branch. Still, there are some limits that are given by the server implementation you are using: https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/requestfiltering/requestlimits/

@raman-m
Copy link
Member

raman-m commented Jan 25, 2024

@ggnaegi
Someone with the user name @alexandis is TypeScript developer!!! ☝️
Talking to an user who has probably zero knowledges in C#, .NET, and ASP.NET has no much sense.
Am I right Mr. @alexandis, and you can show us good PRs in C#, right? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identified as a potential bug question Initially seen a question could become a new feature or bug or closed ;)
Projects
None yet
Development

No branches or pull requests

5 participants