aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.go b/main.go
index 4ab9579..d1557f6 100644
--- a/main.go
+++ b/main.go
@@ -73,11 +73,16 @@ func proxy(w http.ResponseWriter, req *http.Request) {
73 return 73 return
74 } 74 }
75 75
76 uri, err := url.QueryUnescape(path)
77 if err != nil {
78 io.WriteString(w, fmt.Sprintf("<b>Error:</b><pre>%s</pre>", err))
79 return
80 }
76 res, err := gopher.Get( 81 res, err := gopher.Get(
77 fmt.Sprintf( 82 fmt.Sprintf(
78 "gopher://%s/%s", 83 "gopher://%s/%s",
79 hostport, 84 hostport,
80 url.QueryEscape(path), 85 uri,
81 ), 86 ),
82 ) 87 )
83 if err != nil { 88 if err != nil {