Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
某些时候i.pximg.net不给Content-Length
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiichiamane committed Jun 4, 2020
1 parent 6ce3fff commit 3514417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PixivFSUWP/Data/OverAll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static async Task<MemoryStream> DownloadImage(string Uri, CancellationTok
var res = await new PixivAppAPI(GlobalBaseAPI).RequestCall("GET",
Uri, new Dictionary<string, string>() { { "Referer", "https://app-api.pixiv.net/" } });
//读取长度
var length = res.Content.Headers.ContentLength.Value;
var length = res.Content.Headers.ContentLength ?? -1;
using (var resStream = await res.Content.ReadAsStreamAsync())
{
var memStream = new MemoryStream();
Expand Down

0 comments on commit 3514417

Please sign in to comment.