diff options
| author | Adnan Maolood <[email protected]> | 2020-12-18 00:25:06 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2020-12-18 00:25:06 -0500 |
| commit | 35836f2ff733a2039e5698e4cd71d2da43c5425c (patch) | |
| tree | 43675898e632784998093e3084a0f319812c5aa9 /examples | |
| parent | Remove Response.Request field (diff) | |
| download | go-gemini-35836f2ff733a2039e5698e4cd71d2da43c5425c.tar.xz go-gemini-35836f2ff733a2039e5698e4cd71d2da43c5425c.zip | |
Remove Input function
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/auth.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/auth.go b/examples/auth.go index d61970e..d0ddf0b 100644 --- a/examples/auth.go +++ b/examples/auth.go @@ -74,8 +74,8 @@ func changeUsername(w *gemini.ResponseWriter, r *gemini.Request) { return } - username, ok := gemini.Input(r) - if !ok { + username, err := gemini.QueryUnescape(r.URL.RawQuery) + if err != nil || username == "" { w.WriteHeader(gemini.StatusInput, "Username") return } |