aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-11-17 10:41:24 +0100
committerFeuerfuchs <git@feuerfuchs.dev>2019-11-17 10:41:24 +0100
commit1802def60fbb164a05989d09b76ae82024af778f (patch)
tree2be0032f17becd21a03eb1c3bdf9e3f4455db595
parentAllow custom path for startpage file (diff)
downloadgopherproxy-1802def60fbb164a05989d09b76ae82024af778f.tar.gz
gopherproxy-1802def60fbb164a05989d09b76ae82024af778f.tar.bz2
gopherproxy-1802def60fbb164a05989d09b76ae82024af778f.zip
Include a default startpage (WIP)
-rw-r--r--gopherproxy.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/gopherproxy.go b/gopherproxy.go
index 9a081dc..a91e057 100644
--- a/gopherproxy.go
+++ b/gopherproxy.go
@@ -602,7 +602,10 @@ func ListenAndServe(bind, startpagefile string, robotsfile string, robotsdebug b
602 602
603 startpagedata, err := ioutil.ReadFile(startpagefile) 603 startpagedata, err := ioutil.ReadFile(startpagefile)
604 if err != nil { 604 if err != nil {
605 startpagedata = []byte{} 605 startpagedata, err = box.Find("startpage.txt")
606 if err != nil {
607 startpagedata = []byte{}
608 }
606 } 609 }
607 startpagetext := string(startpagedata) 610 startpagetext := string(startpagedata)
608 611