mirror of
https://github.com/kataras/iris.git
synced 2026-01-19 01:45:58 +00:00
fix typo
Former-commit-id: 7b5d5530279789a3118190feb57776948b305662
This commit is contained in:
@@ -582,7 +582,7 @@ func (e Entry) BoolDefault(def bool) (bool, error) {
|
||||
// respects the immutable.
|
||||
func (e Entry) Value() interface{} {
|
||||
if e.immutable {
|
||||
// take its value, no pointer even if setted with a reference.
|
||||
// take its value, no pointer even if set with a reference.
|
||||
vv := reflect.Indirect(reflect.ValueOf(e.ValueRaw))
|
||||
|
||||
// return copy of that slice
|
||||
|
||||
@@ -127,7 +127,7 @@ func ResolveAddr(addr string) string {
|
||||
if a[portIdx:] == ":https" {
|
||||
a = defaultServerHostname + ":443"
|
||||
} else {
|
||||
// if contains only :port ,then the : is the first letter, so we dont have setted a hostname, lets set it
|
||||
// if contains only :port ,then the : is the first letter, so we dont have set a hostname, lets set it
|
||||
a = defaultServerHostname + a
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func (ch *ErrorCodeHandler) Fire(ctx context.Context) {
|
||||
// if we can reset the body
|
||||
if w, ok := ctx.IsRecording(); ok {
|
||||
if statusCodeSuccessful(w.StatusCode()) { // if not an error status code
|
||||
w.WriteHeader(ch.StatusCode) // then set it manually here, otherwise it should be setted via ctx.StatusCode(...)
|
||||
w.WriteHeader(ch.StatusCode) // then set it manually here, otherwise it should be set via ctx.StatusCode(...)
|
||||
}
|
||||
// reset if previous content and it's recorder, keep the status code.
|
||||
w.ClearHeaders()
|
||||
|
||||
Reference in New Issue
Block a user