diff options
Diffstat (limited to 'gemini/request.go')
-rw-r--r-- | gemini/request.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gemini/request.go b/gemini/request.go index 51aaae5..4eb7cf0 100644 --- a/gemini/request.go +++ b/gemini/request.go @@ -6,7 +6,7 @@ import ( "io" "net/url" - sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/internal/types" ) // InvalidRequestLineEnding indicates that a gemini request didn't end with "\r\n". @@ -15,7 +15,7 @@ var InvalidRequestLineEnding = errors.New("invalid request line ending") // ParseRequest parses a single gemini request from a reader. // // If the reader argument is a *bufio.Reader, it will only read a single line from it. -func ParseRequest(rdr io.Reader) (*sr.Request, error) { +func ParseRequest(rdr io.Reader) (*types.Request, error) { bufrdr, ok := rdr.(*bufio.Reader) if !ok { bufrdr = bufio.NewReader(rdr) @@ -39,14 +39,14 @@ func ParseRequest(rdr io.Reader) (*sr.Request, error) { u.Scheme = "gemini" } - return &sr.Request{URL: u}, nil + return &types.Request{URL: u}, nil } // GetTitanRequestBody fetches the request body from a titan request. // // It returns nil if the argument is not a titan request or it otherwise // does not have a request body set. -func GetTitanRequestBody(request *sr.Request) io.Reader { +func GetTitanRequestBody(request *types.Request) io.Reader { if request.Scheme != "titan" { return nil } |