1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

Update to version 12.1.6

Former-commit-id: 4d39e8a764a7c0d91b19a3710d8afe6c8c208c62
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-02-05 12:36:21 +02:00
parent d4e38da3ad
commit 9c97a8a668
14 changed files with 145 additions and 120 deletions

14
iris.go
View File

@@ -41,7 +41,7 @@ import (
)
// Version is the current version number of the Iris Web Framework.
const Version = "12.1.5"
const Version = "12.1.6"
// HTTP status codes as registered with IANA.
// See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.
@@ -583,9 +583,17 @@ func (app *Application) NewHost(srv *http.Server) *host.Supervisor {
srv.ErrorLog = log.New(app.logger.Printer.Output, "[HTTP Server] ", 0)
}
if srv.Addr == "" {
srv.Addr = ":8080"
if addr := srv.Addr; addr == "" {
addr = ":8080"
if len(app.Hosts) > 0 {
if v := app.Hosts[0].Server.Addr; v != "" {
addr = v
}
}
srv.Addr = addr
}
app.logger.Debugf("Host: addr is %s", srv.Addr)
// create the new host supervisor