Запрос на удаление ASP.NET возвращает 431 слишком большой заголовок запроса - PullRequest
0 голосов
/ 04 мая 2019

Недавно я обнаружил реализацию .NET протокола Tus (tusdotnet), которую я использую для возобновляемой загрузки файлов. tusdotnet создает API в фоновом режиме для управления файлами. Загрузка и возобновление работают должным образом, однако, когда я вызываю конечную точку удаления, я вижу это в журнале сервера:

...
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 DELETE http://localhost:5000/api/files/53517b97052145d587144586cb0771a7  0
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
      Successfully validated the token.
info: Microsoft.AspNetCore.Server.Kestrel[17]
      Connection id "0HLMGF3SR07CI" bad request data: "Request headers too long."
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request headers too long.
   at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw(RequestRejectionReason reason)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TakeMessageHeaders(ReadOnlySequence`1 buffer, SequencePosition& consumed, SequencePosition& examined)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.ParseRequest(ReadOnlySequence`1 buffer, SequencePosition& consumed, SequencePosition& examined)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TryParseRequest(ReadResult result, Boolean& endConnection)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequestsAsync[TContext](IHttpApplication`1 application)
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 5.63ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 9.6507ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 13.6635ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 18.2374ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 22.7664ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 26.6078ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 30.5116ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 34.3513ms 431 
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 38.3285ms 431 
...

Судя по всему, кажется, что он делает то же самое с запросом снова и снова.

Почему так много логов об этом 1 запросе? Что может вызвать такую ​​проблему?

...