mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-11-23 12:42:13 +01:00
Clarify comment
This commit is contained in:
parent
4197d51545
commit
1c89de359c
@ -28,6 +28,7 @@ type Request struct {
|
|||||||
URL *url.URL
|
URL *url.URL
|
||||||
|
|
||||||
// For client requests, Host specifies the host on which the URL is sought.
|
// For client requests, Host specifies the host on which the URL is sought.
|
||||||
|
// Host must contain a port.
|
||||||
// This field is ignored by the server.
|
// This field is ignored by the server.
|
||||||
Host string
|
Host string
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// sendRequest sends a request to the given url.
|
// sendRequest sends a request to the given URL.
|
||||||
func sendRequest(req *gmi.Request) error {
|
func sendRequest(req *gmi.Request) error {
|
||||||
resp, err := client.Send(req)
|
resp, err := client.Send(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -212,7 +212,7 @@ func InputHandler(prompt string) Handler {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirect replies to the request with a redirect to the given url.
|
// Redirect replies to the request with a redirect to the given URL.
|
||||||
func Redirect(rw *ResponseWriter, req *Request, url string) {
|
func Redirect(rw *ResponseWriter, req *Request, url string) {
|
||||||
rw.WriteHeader(StatusRedirect, url)
|
rw.WriteHeader(StatusRedirect, url)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user