Closed xakepbean closed 6 years ago
0x09
is TAB
not
(space)
I use the source code for debugging, it is indeed the beginning of a space caused. The temporary solution is to TrimStart () file name, the program can be downloaded normally
Was just pointing out
Invalid non-ASCII or control character in header: 0x0009
Is a TAB
charater; space
would be 0x0020
and allowed
Sorry, I was wrong
Its this issue btw https://github.com/aspnet/KestrelHttpServer/issues/1144
System.InvalidOperationException: Invalid non-ASCII or control character in header: 0x0009 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.ThrowInvalidHeaderCharacter(Char ch) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.ValidateHeaderCharacters(String headerCharacters) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.ValidateHeaderCharacters(StringValues headerValues) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameResponseHeaders.SetValueFast(String key, StringValues value) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.Microsoft.AspNetCore.Http.IHeaderDictionary.set_Item(String key, StringValues value) at Microsoft.AspNetCore.Mvc.Internal.FileResultExecutorBase.SetContentDispositionHeader(ActionContext context, FileResult result) at Microsoft.AspNetCore.Mvc.Internal.FileResultExecutorBase.SetHeadersAndLog(ActionContext context, FileResult result, Nullable
1 fileLength, Nullable1 lastModified, EntityTagHeaderValue etag) at Microsoft.AspNetCore.Mvc.Internal.FileContentResultExecutor.ExecuteAsync(ActionContext context, FileContentResult result)