diff options
Diffstat (limited to 'Timeline/Controllers')
-rw-r--r-- | Timeline/Controllers/UserAvatarController.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Timeline/Controllers/UserAvatarController.cs b/Timeline/Controllers/UserAvatarController.cs index e7e12d0b..e77076ca 100644 --- a/Timeline/Controllers/UserAvatarController.cs +++ b/Timeline/Controllers/UserAvatarController.cs @@ -122,7 +122,8 @@ namespace Timeline.Controllers return BadRequest(new CommonResponse(ErrorCodes.Put_Content_UnmatchedLength_Less,
$"Content length in header is {contentLength} but actual length is {bytesRead}."));
- if (Request.Body.ReadByte() != -1)
+ var extraByte = new byte[1];
+ if (await Request.Body.ReadAsync(extraByte) != 0)
return BadRequest(new CommonResponse(ErrorCodes.Put_Content_UnmatchedLength_Bigger,
$"Content length in header is {contentLength} but actual length is bigger than that."));
|