implemented HTTP 1.0/1.1 server
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package http
|
||||
|
||||
type HttpError struct {
|
||||
Status StatusCode
|
||||
Msg string
|
||||
}
|
||||
|
||||
func (e *HttpError) Error() string {
|
||||
return e.Status.String() + ": " + e.Msg
|
||||
}
|
||||
|
||||
func NewHttpError(code StatusCode, msg string) *HttpError {
|
||||
return &HttpError{Status: code, Msg: msg}
|
||||
}
|
||||
Reference in New Issue
Block a user