Assume a default scheme of gemini://
This commit is contained in:
parent
9daf84a121
commit
376c602748
|
@ -232,7 +232,10 @@ func (s *Server) respond(conn net.Conn) {
|
||||||
// Note that we return an error status if User is specified in the URL
|
// Note that we return an error status if User is specified in the URL
|
||||||
w.WriteHeader(StatusBadRequest, "Bad request")
|
w.WriteHeader(StatusBadRequest, "Bad request")
|
||||||
} else {
|
} else {
|
||||||
// Gather information about the request
|
// If no scheme is specified, assume a default scheme of gemini://
|
||||||
|
if url.Scheme == "" {
|
||||||
|
url.Scheme = "gemini"
|
||||||
|
}
|
||||||
req := &Request{
|
req := &Request{
|
||||||
URL: url,
|
URL: url,
|
||||||
RemoteAddr: conn.RemoteAddr(),
|
RemoteAddr: conn.RemoteAddr(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user