Update to 4.4.6

This commit is contained in:
Gerasimos Maropoulos 2016-10-04 01:18:17 +03:00
parent f39b6c4bfb
commit 2090eb4d83
4 changed files with 30 additions and 22 deletions

View File

@ -10,9 +10,11 @@ Feel free to send **any** amount through paypal
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kataras2006%40hotmail%2ecom&lc=GR&item_name=Iris%20web%20framework&item_number=iriswebframeworkdonationid2016&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted&return=http://iris-go.com/assets/v4-book/iris.pdf&cancel_return=https://www.gitbook.com/book/kataras/iris/details)
> Please check your e-mail after your donation, I will ask you if you want to public your donation
Benefits:
- Direct download the `donator edition guide`
- Your github username is visible to the very-top of the README page
- Access to the 'donors' [private chat room](https://kataras.rocket.chat/group/donors), real-time assistance by me.
**Thank you**!
@ -29,7 +31,7 @@ I'm grateful for all the generous donations. Iris is fully funded by these dona
- [Bob Lee](https://github.com/li3p) donated 20 EUR at September 16
- [Celso Luiz](https://github.com/celsosz) donated 50 EUR at September 29
- ANONYMOUS(Waiting For Approval) donated 6 EUR at October 1
- Ankur Srivastava donated 20 EUR at October 2
- [Ankur Srivastava](https://github.com/ansrivas) donated 20 EUR at October 2
> The name of the donator added after his/her permission.

View File

@ -19,7 +19,7 @@
<br/>
<a href="https://github.com/kataras/iris/releases"><img src="https://img.shields.io/badge/%20version%20-%204.4.5%20-blue.svg?style=flat-square" alt="Releases"></a>
<a href="https://github.com/kataras/iris/releases"><img src="https://img.shields.io/badge/%20version%20-%204.4.6%20-blue.svg?style=flat-square" alt="Releases"></a>
<a href="https://github.com/iris-contrib/examples"><img src="https://img.shields.io/badge/%20examples-repository-3362c2.svg?style=flat-square" alt="Examples"></a>
@ -32,18 +32,23 @@ The <a href="https://github.com/kataras/iris#benchmarks">fastest</a> back-end we
<br/>
Easy to <a href="https://www.gitbook.com/book/kataras/iris/details">learn</a>, while it's highly customizable. <br/>
Ideally suited for both experienced and novice <b>Developers</b>.
<br/>
<br/>
<img src="https://raw.githubusercontent.com/smallnest/go-web-framework-benchmark/4db507a22c964c9bc9774c5b31afdc199a0fe8b7/benchmark.png" href="#benchmarks" alt="Benchmark Wizzard July 21, 2016- Processing Time Horizontal Graph" />
</p>
## News
- [Iris vs Nginx vs Nodejs express](https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fwww.ntossapo.me%2F2016%2F08%2F13%2Fnginx-vs-nginx-php-fpm-vs-go-iris-vs-express-with-wrk%2F&edit-text=&act=url)
- Check out [this](https://t.co/Y7bK0THScG) Meetup with GoLang User Group. Contains ~30 minutes talk about the Iris web framework. Happens at Thursday, October 13, 2016.
#### Donations
I'm grateful for all the generous donations. Iris is fully funded by these donations[*](DONATIONS.md).
- [Ryan Brooks](https://github.com/ryanbyyc) donated 50 EUR at May 11
- [Juan Sebastián Suárez Valencia](https://github.com/Juanses) donated 20 EUR at September 11
- [Bob Lee](https://github.com/li3p) donated 20 EUR at September 16
- [Celso Luiz](https://github.com/celsosz) donated 50 EUR at September 29
- [Ankur Srivastava](https://github.com/ansrivas) donated 20 EUR at October 2
## Feature Overview
@ -865,7 +870,7 @@ I recommend writing your API tests using this new library, [httpexpect](https://
Versioning
------------
Current: **v4.4.5**
Current: **v4.4.6**
> Iris is an active project
@ -901,7 +906,7 @@ This project is licensed under the [MIT License](LICENSE), Copyright (c) 2016 Ge
[Travis]: http://travis-ci.org/kataras/iris
[License Widget]: https://img.shields.io/badge/license-MIT%20%20License%20-E91E63.svg?style=flat-square
[License]: https://github.com/kataras/iris/blob/master/LICENSE
[Release Widget]: https://img.shields.io/badge/release-4.4.5%20-blue.svg?style=flat-square
[Release Widget]: https://img.shields.io/badge/release-4.4.6%20-blue.svg?style=flat-square
[Release]: https://github.com/kataras/iris/releases
[Chat Widget]: https://img.shields.io/badge/community-chat%20-00BCD4.svg?style=flat-square
[Chat]: https://kataras.rocket.chat/channel/iris

View File

@ -409,8 +409,8 @@ func TestMuxSimpleParty(t *testing.T) {
}
Default.Config.VHost = "0.0.0.0:8080"
Default.Config.Tester.Debug = true
//Default.Config.Tester.ExplicitURL = true
// Default.Config.Tester.Debug = true
// Default.Config.Tester.ExplicitURL = true
e := Tester(t)
request := func(reqPath string) {
@ -421,7 +421,7 @@ func TestMuxSimpleParty(t *testing.T) {
}
// run the tests
request("/party1")
request("/party1/")
request("/party1/path1")
request("/party1/path2")
request("/party1/namedpath/theparam1/something/theparam2")

19
iris.go
View File

@ -63,7 +63,6 @@ import (
"strconv"
"strings"
"sync"
"syscall"
"testing"
"time"
@ -80,7 +79,7 @@ import (
const (
// Version is the current version of the Iris web framework
Version = "4.4.4"
Version = "4.4.6"
banner = ` _____ _
|_ _| (_)
@ -457,14 +456,15 @@ func (s *Framework) Serve(ln net.Listener) error {
s.Plugins.DoPostListen(s)
go func() { s.Available <- true }()
ch := make(chan os.Signal, 2)
signal.Notify(ch, os.Interrupt, syscall.SIGTERM)
ch := make(chan os.Signal, 1)
signal.Notify(ch, os.Interrupt)
<-ch
if err := s.Close(); err != nil {
if s.Config.IsDevelopment {
s.Logger.Printf("Error while closing the server: %s\n", err)
}
return err
}
os.Exit(1)
return nil
}
@ -1351,15 +1351,16 @@ func (api *muxAPI) Handle(method string, registedPath string, handlers ...Handle
// not needed after the redirect status change for POST methods
// we splitted the path and subdomain parts so we're ready to check only the path,
// otherwise we will had problems with subdomains
/*if api.mux.correctPath {
// if the user wants beta:= iris.Party("/beta"); beta.Get("/") to be registered as : /beta/ then should disable the path correction OR register it like: beta.Get("//")
// this is only for the party's roots in order to have expected paths, as we do with iris.Get("/") which is localhost:8080 as RFC points, not localhost:8080/
if api.mux.correctPath && registedPath == slash { // check the given relative path
// remove last "/" if any, "/xyz/"
if len(path) > 1 { // if it's the root, then keep it*
if path[len(path)-1] == slashByte {
// ok we are inside /xyz/
path = path[0 : len(path)-1]
}
}
}*/
}
path = strings.Replace(path, "//", "/", -1) // fix the path if double //