Skip to content

Commit 3bc25b4

Browse files
authored
Merge pull request #111 from fengyhack/master
新增:HttpManager.get对于WebException的处理
2 parents 4b8191c + 78a39bb commit 3bc25b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Qiniu/Http/HttpManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ public void get(string pUrl, Dictionary<string, string> pHeaders,
5555
{
5656
vWebReq = (HttpWebRequest)WebRequest.Create(pUrl);
5757
}
58+
catch(WebException wexp)
59+
{
60+
// FIX-HTTP 4xx/5xx Error 2016-11-22, 17:00 @fengyh
61+
HttpWebResponse xWebResp = wexp.Response as HttpWebResponse;
62+
handleErrorWebResponse(xWebResp, pCompletionHandler, wexp);
63+
}
5864
catch (Exception ex)
5965
{
6066
if (pCompletionHandler != null)

0 commit comments

Comments
 (0)