Skip to content

Commit d4a8507

Browse files
authored
Merge pull request #82 from nakamura2000/feature/support_mixed
Fix "Key not found" exception when name and filename parameters are omitted
2 parents 7aa5925 + ac6ddd0 commit d4a8507

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/HttpMultipartParser/StreamingMultipartFormDataParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ private async Task ParseSectionAsync(RebufferableBinaryReader reader, Cancellati
11511151
// Now that we've consumed all the parameters we're up to the body. We're going to do
11521152
// different things depending on if we're parsing a, relatively small, form value or a
11531153
// potentially large file.
1154-
if (parameters.ContainsKey("filename"))
1154+
if (parameters.ContainsKey("filename") || !parameters.ContainsKey("name"))
11551155
{
11561156
// Right now we assume that if a section contains filename then it is a file.
11571157
// This assumption needs to be checked, it holds true in firefox but is untested for other

0 commit comments

Comments
 (0)