1 write to Headers
Microsoft.AspNetCore.WebUtilities (1)
MultipartReader.cs (1)
102
return new MultipartSection() {
Headers
= headers, Body = _currentStream, BaseStreamOffset = baseStreamOffset };
38 references to Headers
Microsoft.AspNetCore.Http (1)
Features\FormFeature.cs (1)
275
file.Headers = new HeaderDictionary(section.
Headers
);
Microsoft.AspNetCore.WebUtilities (4)
MultipartSection.cs (4)
21
if (
Headers
!= null &&
Headers
.TryGetValue(HeaderNames.ContentType, out var values))
36
if (
Headers
!= null &&
Headers
.TryGetValue(HeaderNames.ContentDisposition, out var values))
Microsoft.AspNetCore.WebUtilities.Tests (33)
MultipartReaderTests.cs (33)
115
Assert.Single(section.
Headers
);
116
Assert.Equal("form-data; name=\"text\"", section.
Headers
["Content-Disposition"][0]);
158
Assert.Single(section.
Headers
);
159
Assert.Equal("form-data; name=\"text\"", section.
Headers
["Content-Disposition"][0]);
175
Assert.Single(section.
Headers
);
176
Assert.Equal("form-data; name=\"text\"", section.
Headers
["Content-Disposition"][0]);
192
Assert.Single(section.
Headers
);
193
Assert.Equal("form-data; name=\"text\"", section.
Headers
["Content-Disposition"][0]);
200
Assert.Equal(2, section.
Headers
.Count);
201
Assert.Equal("form-data; name=\"file1\"; filename=\"a.txt\"", section.
Headers
["Content-Disposition"][0]);
202
Assert.Equal("text/plain", section.
Headers
["Content-Type"][0]);
218
Assert.Single(section.
Headers
);
219
Assert.Equal("form-data; name=\"text\"", section.
Headers
["Content-Disposition"][0]);
226
Assert.Equal(2, section.
Headers
.Count);
227
Assert.Equal("form-data; name=\"file1\"; filename=\"a色.txt\"", section.
Headers
["Content-Disposition"][0]);
228
Assert.Equal("text/plain", section.
Headers
["Content-Type"][0]);
244
Assert.Single(section.
Headers
);
245
Assert.Equal("form-data; name=\"text\"", section.
Headers
["Content-Disposition"][0]);
252
Assert.Equal(2, section.
Headers
.Count);
253
Assert.Equal("form-data; name=\"file1\"; filename=\"a.txt\"", section.
Headers
["Content-Disposition"][0]);
254
Assert.Equal("text/plain", section.
Headers
["Content-Type"][0]);
261
Assert.Equal(2, section.
Headers
.Count);
262
Assert.Equal("form-data; name=\"file2\"; filename=\"a.html\"", section.
Headers
["Content-Disposition"][0]);
263
Assert.Equal("text/html", section.
Headers
["Content-Type"][0]);
291
Assert.Single(section.
Headers
);
292
Assert.Equal("form-data; name=\"text\"", section.
Headers
["Content-Disposition"][0]);
299
Assert.Equal(2, section.
Headers
.Count);
300
Assert.Equal("form-data; name=\"file1\"; filename=\"a.txt\"", section.
Headers
["Content-Disposition"][0]);
301
Assert.Equal("text/plain", section.
Headers
["Content-Type"][0]);
338
Assert.Single(section.
Headers
);
339
Assert.Equal("form-data; name=\"text\" filename=\"a\uFFFD!.txt\"", section.
Headers
["Content-Disposition"][0]);
373
Assert.Single(section.
Headers
);
374
Assert.Equal("form-data; name=\"text\" filename=\"a\uFFFD\uFFFDU.txt\"", section.
Headers
["Content-Disposition"][0]);