diff --git a/HISTORY.md b/HISTORY.md index bac373c7..b39e4415 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,11 +2,13 @@ **How to upgrade**: remove your `$GOPATH/src/github.com/kataras` folder, open your command-line and execute this command: `go get -u github.com/kataras/iris/iris`. -## 4.4.1 -> 4.4.4 +## 4.4.1 -> 4.4.5 -- **FIX**: CORS +- **FIX**: CORS not worked for all http methods - **FIX**: Unexpected Party root's route slash when `DisablePathCorrection` is false(default), as reported [here](https://github.com/kataras/iris/issues/453) -- **small fix**: DisablePathEscape not affects +- **small fix**: DisablePathEscape not affects the uri string +- **small fix**: when Path Correction on POST redirect to the GET instead of POST + ## 4.4.0 -> 4.4.1 - **NEW**: Template PreRenders, as requested [here](https://github.com/kataras/iris/issues/412). diff --git a/README.md b/README.md index 57b9c975..dede6827 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@
-Releases +Releases Examples @@ -849,7 +849,7 @@ I recommend writing your API tests using this new library, [httpexpect](https:// Versioning ------------ -Current: **v4.4.4** +Current: **v4.4.5** > Iris is an active project @@ -885,7 +885,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.4%20-blue.svg?style=flat-square +[Release Widget]: https://img.shields.io/badge/release-4.4.5%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 diff --git a/http.go b/http.go index fa42fe6c..fa27e2ae 100644 --- a/http.go +++ b/http.go @@ -1157,11 +1157,14 @@ func (mux *serveMux) BuildHandler() HandlerFunc { context.Request.URI().SetPath(reqPath) urlToRedirect := utils.BytesToString(context.Request.RequestURI()) - statisForRedirect := StatusMovedPermanently // StatusMovedPermanently, this document is obselte, clients caches this, so no performance difference to the next call + + statisForRedirect := StatusMovedPermanently // StatusMovedPermanently, this document is obselte, clients caches this. if bytes.Equal(tree.method, MethodPostBytes) || - bytes.Equal(tree.method, MethodPutBytes) || bytes.Equal(tree.method, MethodDeleteBytes) { - statisForRedirect = StatusTemporaryRedirect // To mantain POST data + bytes.Equal(tree.method, MethodPutBytes) || + bytes.Equal(tree.method, MethodDeleteBytes) { + statisForRedirect = StatusTemporaryRedirect // To maintain POST data } + context.Redirect(urlToRedirect, statisForRedirect) // RFC2616 recommends that a short note "SHOULD" be included in the // response because older user agents may not understand 301/307.