mirror of
https://code.dumpstack.io/tools/wi.git
synced 2024-11-14 06:19:19 +02: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