[release] version 0.5.0-unstable18
This commit is contained in:
parent
cc849b756d
commit
7352e1f61f
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cosmos-server",
|
"name": "cosmos-server",
|
||||||
"version": "0.5.0-unstable17",
|
"version": "0.5.0-unstable18",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "test-server.js",
|
"main": "test-server.js",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
10
src/icons.go
10
src/icons.go
|
@ -63,7 +63,6 @@ func GetFavicon(w http.ResponseWriter, req *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(req.Method == "GET") {
|
if(req.Method == "GET") {
|
||||||
utils.Log("Fetch favicon for " + siteurl)
|
utils.Log("Fetch favicon for " + siteurl)
|
||||||
|
|
||||||
|
@ -75,6 +74,15 @@ func GetFavicon(w http.ResponseWriter, req *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// follow siteurl and check if any redirect. if yes, use the final url
|
||||||
|
respNew, err := http.Get(siteurl)
|
||||||
|
if err != nil {
|
||||||
|
utils.Error("FaviconFetch", err)
|
||||||
|
sendFallback(w)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
siteurl = respNew.Request.URL.String()
|
||||||
|
|
||||||
icons, err := favicon.Find(siteurl)
|
icons, err := favicon.Find(siteurl)
|
||||||
utils.Debug("Found Favicon: " + strconv.Itoa(len(icons)))
|
utils.Debug("Found Favicon: " + strconv.Itoa(len(icons)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue