mirror of
https://github.com/kataras/iris.git
synced 2025-03-14 08:26:26 +01:00
Update to 8.2.3 | Fix https://github.com/kataras/iris/issues/714
Former-commit-id: 67ec32dd9ca5f228f56b2b73196cfa9c2ae94474
This commit is contained in:
parent
0e260897fb
commit
bf929aa557
|
@ -18,6 +18,14 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene
|
|||
|
||||
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
|
||||
|
||||
# Th, 10 August 2017 | v8.2.3
|
||||
|
||||
No API Changes.
|
||||
|
||||
Fix https://github.com/kataras/iris/issues/714
|
||||
|
||||
Continue to v8.2.2 for more...
|
||||
|
||||
# Th, 10 August 2017 | v8.2.2
|
||||
|
||||
No API Changes.
|
||||
|
@ -38,7 +46,6 @@ Or
|
|||
app.Configure(iris.WithConfiguration(iris.Configuration{DisableVersionChecker:true}))
|
||||
```
|
||||
|
||||
|
||||
# Tu, 08 August 2017 | v8.2.1
|
||||
|
||||
No API Changes. Great news for the unique iris sessions library, once again.
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
Iris is a fast, simple and efficient micro web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website, API, or distributed app.
|
||||
|
||||
[Star or watch](https://github.com/kataras/iris/stargazers) this repository, it is still in **active development mode**.
|
||||
|
||||
<!-- [](http://iris-go.com/graph) -->
|
||||
[](https://travis-ci.org/kataras/iris)
|
||||
[](http://goreportcard.com/report/kataras/iris)
|
||||
|
@ -319,7 +321,7 @@ Thank You for your trust!
|
|||
|
||||
### 📌 Version
|
||||
|
||||
Current: **8.2.2**
|
||||
Current: [VERSION](VERSION)
|
||||
|
||||
Each new release is pushed to the master. It stays there until the next version. When a next version is released then the previous version goes to its own branch with `gopkg.in` as its import path (and its own vendor folder), in order to keep it working "for-ever".
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
8.2.2:https://github.com/kataras/iris/blob/master/HISTORY.md#th-10-august-2017--v822
|
||||
8.2.3:https://github.com/kataras/iris/blob/master/HISTORY.md#th-10-august-2017--v823
|
|
@ -70,36 +70,14 @@ func FromStd(handler interface{}) context.Handler {
|
|||
|
||||
}
|
||||
|
||||
// FromStdWithNext receives a standar handler - middleware form - and returns a compatible context.Handler wrapper.
|
||||
// FromStdWithNext receives a standar handler - middleware form - and returns a
|
||||
// compatible context.Handler wrapper.
|
||||
func FromStdWithNext(h func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)) context.Handler {
|
||||
return func(ctx context.Context) {
|
||||
// take the next handler in route's chain
|
||||
nextIonHandler := ctx.NextHandler()
|
||||
if nextIonHandler != nil {
|
||||
executed := false // we need to watch this in order to StopExecution from all next handlers
|
||||
// if this next handler is not executed by the third-party net/http next-style Handlers.
|
||||
nextHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
nextIonHandler(ctx)
|
||||
executed = true
|
||||
next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx.Next()
|
||||
})
|
||||
|
||||
h(ctx.ResponseWriter(), ctx.Request(), nextHandler)
|
||||
|
||||
// after third-party Handlers's job:
|
||||
if executed {
|
||||
// if next is executed then increment the position manually
|
||||
// in order to the next handler not to be executed twice.
|
||||
ctx.HandlerIndex(ctx.HandlerIndex(-1) + 1)
|
||||
} else {
|
||||
// otherwise StopExecution from all next handlers.
|
||||
ctx.StopExecution()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// if not next handler found then this is not a 'valid' Handlers but
|
||||
// some Handlers may don't care about next,
|
||||
// so we just execute the handler with an empty net.
|
||||
h(ctx.ResponseWriter(), ctx.Request(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}))
|
||||
h(ctx.ResponseWriter(), ctx.Request(), next)
|
||||
}
|
||||
}
|
||||
|
|
2
doc.go
2
doc.go
|
@ -35,7 +35,7 @@ Source code and other details for the project are available at GitHub:
|
|||
|
||||
Current Version
|
||||
|
||||
8.2.2
|
||||
8.2.3
|
||||
|
||||
Installation
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user