mirror of
https://github.com/eyebluecn/tank.git
synced 2024-04-21 12:32:16 +00:00
fix: fix the status code hint bug.
This commit is contained in:
@@ -1241,6 +1241,10 @@ func (this *MatterService) AtomicCrawl(request *http.Request, url string, filena
|
||||
//download from url.
|
||||
resp, err := http.Get(url)
|
||||
this.PanicError(err)
|
||||
//if resp is not ok.
|
||||
if resp.StatusCode != 200 {
|
||||
panic(result.BadRequest("error when crawl from url."))
|
||||
}
|
||||
|
||||
return this.Upload(request, resp.Body, nil, user, space, dirMatter, filename, privacy)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user