Expose Request.Write and Response.Read functions

This commit is contained in:
Adnan Maolood
2020-12-18 01:14:06 -05:00
parent c329a2487e
commit decd72cc23
4 changed files with 9 additions and 8 deletions

View File

@@ -65,8 +65,8 @@ func NewRequestFromURL(url *url.URL) *Request {
}
}
// write writes the Gemini request to the provided buffered writer.
func (r *Request) write(w *bufio.Writer) error {
// Write writes the Gemini request to the provided buffered writer.
func (r *Request) Write(w *bufio.Writer) error {
url := r.URL.String()
// User is invalid
if r.URL.User != nil || len(url) > 1024 {