18 writes to FileNameStar
Microsoft.AspNetCore.Http.Microbenchmarks (2)
ContentDispositionHeaderValueBenchmarks.cs (2)
14public void FileNameStarEncoding() => _contentDisposition.FileNameStar = "My TypicalFilename 2024 04 09 08:00:00.dat"; 17public void FileNameStarNoEncoding() => _contentDisposition.FileNameStar = "My_TypicalFilename_2024_04_09-08_00_00.dat";
Microsoft.Net.Http.Headers (2)
ContentDispositionHeaderValue.cs (2)
210FileNameStar = fileName; 220FileNameStar = null;
Microsoft.Net.Http.Headers.Tests (14)
ContentDispositionHeaderValueTest.cs (14)
191contentDisposition.FileNameStar = "new_name"; 206contentDisposition.FileNameStar = "FileÃName.bat"; 220contentDisposition.FileNameStar = "a\u0080b"; 228contentDisposition.FileNameStar = new string('a', 400); // 400 is larger to the max stackallow size 238contentDisposition.FileNameStar = $"a{(char)b}b"; 276contentDisposition.FileNameStar = "new_name"; 415contentDisposition.FileNameStar = "File%Name"; 579{ @"attachment; filename*=UTF-8''foo-a%22.html", new ContentDispositionHeaderValue("attachment") { FileNameStar = @"foo-a"".html" } }, 580{ @"attachment; filename*= UTF-8''foo-%c3%a4.html", new ContentDispositionHeaderValue("attachment") { FileNameStar = "foo-ä.html" } }, 581{ @"attachment; filename* =UTF-8''foo-%c3%a4.html", new ContentDispositionHeaderValue("attachment") { FileNameStar = "foo-ä.html" } }, 582{ @"attachment; filename*=UTF-8''A-%2541.html", new ContentDispositionHeaderValue("attachment") { FileNameStar = "A-%41.html" } }, 583{ @"attachment; filename*=UTF-8''%5cfoo.html", new ContentDispositionHeaderValue("attachment") { FileNameStar = @"\foo.html" } }, 584{ @"attachment; filename=""foo-ae.html""; filename*=UTF-8''foo-%c3%a4.html", new ContentDispositionHeaderValue("attachment") { FileName = @"""foo-ae.html""", FileNameStar = "foo-ä.html" } }, 585{ @"attachment; filename*=UTF-8''foo-%c3%a4.html; filename=""foo-ae.html""", new ContentDispositionHeaderValue("attachment") { FileNameStar = "foo-ä.html", FileName = @"""foo-ae.html""" } },
13 references to FileNameStar
Microsoft.AspNetCore.WebUtilities (2)
FileMultipartSection.cs (2)
42_contentDispositionHeader.FileNameStar.HasValue ? 43_contentDispositionHeader.FileNameStar :
Microsoft.Net.Http.Headers (2)
ContentDispositionHeaderValueIdentityExtensions.cs (2)
23&& (!StringSegment.IsNullOrEmpty(header.FileName) || !StringSegment.IsNullOrEmpty(header.FileNameStar)); 36&& StringSegment.IsNullOrEmpty(header.FileName) && StringSegment.IsNullOrEmpty(header.FileNameStar);
Microsoft.Net.Http.Headers.Tests (9)
ContentDispositionHeaderValueTest.cs (9)
189Assert.Null(contentDisposition.FileNameStar.Value); // Decode failure 192Assert.Equal("new_name", contentDisposition.FileNameStar.AsSpan()); 198Assert.Null(contentDisposition.FileNameStar.Value); 207Assert.Equal("FileÃName.bat", contentDisposition.FileNameStar.AsSpan()); 213Assert.Null(contentDisposition.FileNameStar.Value); 274Assert.Null(contentDisposition.FileNameStar.Value); // Decode failure 277Assert.Equal("new_name", contentDisposition.FileNameStar.AsSpan()); 282Assert.Null(contentDisposition.FileNameStar.Value); 298Assert.Equal(httpFileName.AsSpan(), contentDisposition.FileNameStar); // Should roundtrip through FileNameStar encoding