Remove charset=utf-8 from default media type

This commit is contained in:
Adnan Maolood 2021-03-20 12:04:42 -04:00
parent 1fdef9b608
commit 0a709da439

View File

@ -10,7 +10,7 @@ import (
) )
// The default media type for responses. // The default media type for responses.
const defaultMediaType = "text/gemini; charset=utf-8" const defaultMediaType = "text/gemini"
// Response represents the response from a Gemini request. // Response represents the response from a Gemini request.
// //
@ -142,8 +142,8 @@ func (r *Response) WriteTo(w io.Writer) (int64, error) {
// has returned. // has returned.
type ResponseWriter interface { type ResponseWriter interface {
// SetMediaType sets the media type that will be sent by Write for a // SetMediaType sets the media type that will be sent by Write for a
// successful response. If no media type is set, a default of // successful response. If no media type is set, a default media type of
// "text/gemini; charset=utf-8" will be used. // "text/gemini" will be used.
// //
// Setting the media type after a call to Write or WriteHeader has // Setting the media type after a call to Write or WriteHeader has
// no effect. // no effect.
@ -154,7 +154,7 @@ type ResponseWriter interface {
// If WriteHeader has not yet been called, Write calls WriteHeader with // If WriteHeader has not yet been called, Write calls WriteHeader with
// StatusSuccess and the media type set in SetMediaType before writing the data. // StatusSuccess and the media type set in SetMediaType before writing the data.
// If no media type was set, Write uses a default media type of // If no media type was set, Write uses a default media type of
// "text/gemini; charset=utf-8". // "text/gemini".
Write([]byte) (int, error) Write([]byte) (int, error)
// WriteHeader sends a Gemini response header with the provided // WriteHeader sends a Gemini response header with the provided