mirror of
https://code.dumpstack.io/tools/wi.git
synced 2024-12-26 19:49:47 +00:00
Add to history after success request
This commit is contained in:
parent
6c56bb9e2f
commit
d4a5ae0b1b
4
main.go
4
main.go
@ -91,8 +91,6 @@ func parseLinks(db *sql.DB, body []byte, req *http.Request) (htmlPage string, er
|
||||
}
|
||||
|
||||
func cmd_url(db *sql.DB, url string) {
|
||||
storage.AddHistoryURL(db, url)
|
||||
|
||||
client := &http.Client{}
|
||||
|
||||
// TODO Full url encoding
|
||||
@ -108,6 +106,8 @@ func cmd_url(db *sql.DB, url string) {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
storage.AddHistoryURL(db, url)
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
utf8, err := charset.NewReader(resp.Body, resp.Header.Get("Content-Type"))
|
||||
|
Loading…
Reference in New Issue
Block a user