Skip to content

V16: Allow MaxRequestLength to be specified as a long#18141

Merged
iOvergaard merged 4 commits intov16/devfrom
v16/feature/max-file-size-long
Jan 29, 2025
Merged

V16: Allow MaxRequestLength to be specified as a long#18141
iOvergaard merged 4 commits intov16/devfrom
v16/feature/max-file-size-long

Conversation

@iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Jan 28, 2025

Description

Updates MaxRequestLength from int? to long? to allow for larger files to be uploaded. We expect the value to be set in kilobytes, then we multiply it by 1024, so you cannot even use the max of int32 without exceeding the max value. This means the total possible file size was around 2.5 GB, but with this change we can now allow files of essentially unlimited size.

Also removes the option MaxQueryStringLength as it is no longer used. It was last used in V13.

… to be able to accept larger files

the underlying kestrel architecture already accepts a `long` in ConfigureKestrelServerOptions.cs
@AndyButland
Copy link
Contributor

Looks like this contains some unexpected additional updates @iOvergaard.

@iOvergaard
Copy link
Contributor Author

@AndyButland Yeah, it seems we forgot to update the OpenApi.json file. There's a PR on V15 to update it and once it is on v15/dev, we can merge it to v16/dev and the changes should disappear here.

@iOvergaard iOvergaard requested a review from Zeegaan January 28, 2025 09:44
@iOvergaard iOvergaard enabled auto-merge (squash) January 28, 2025 09:44
Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

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

Looks good for me and correct to do this for 16.

I've just added an obsoletion for the property you have removed in the v15/dev branch.

@iOvergaard iOvergaard merged commit e77bac3 into v16/dev Jan 29, 2025
27 checks passed
@iOvergaard iOvergaard deleted the v16/feature/max-file-size-long branch January 29, 2025 05:31
@iOvergaard
Copy link
Contributor Author

I've just added an obsoletion for the property you have removed in the v15/dev branch.

Great initiative, thanks @AndyButland !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants