Permalink
Browse files

Happy new year! Update to 6.0.0 | HTTP/2 full support. #565

full commit from development branch.

Examples, book, middleware, plugins are updated to the latest iris
version. Read HISTORY.md for more.

The 'old' v5 branch which relied on fasthttp exists for those who want
to use it navigate there: https://github.com/kataras/iris/tree/5.0.0
1 parent ced2083 commit 8bbd9f8fc5489bd72336bba732a21df361707ce2 @kataras committed Jan 2, 2017
Showing with 2,061 additions and 2,207 deletions.
  1. +3 −1 .github/CONTRIBUTING.md
  2. +1 −1 .github/ISSUE_TEMPLATE.md
  3. +0 −4 .github/PULL_REQUEST_TEMPLATE.md
  4. +11 −16 DONATIONS.md
  5. +52 −0 HISTORY.md
  6. +17 −27 LICENSE
  7. +71 −176 README.md
  8. +86 −148 configuration.go
  9. +2 −1 configuration_test.go
  10. +510 −616 context.go
  11. +57 −347 context_test.go
  12. +195 −247 http.go
  13. +118 −104 http_test.go
  14. +33 −3 httptest/httptest.go
  15. +254 −410 iris.go
  16. +2 −1 iris/fs.go
  17. +4 −3 iris/get.go
  18. +0 −1 iris/run.go
  19. +1 −2 plugin.go
  20. +0 −6 plugin_test.go
  21. +280 −0 response_writer.go
  22. +5 −4 template.go
  23. +166 −0 transactions.go
  24. +149 −0 webfs.go
  25. +44 −89 websocket.go
@@ -1,4 +1,6 @@
-##### Note that I do not accept pull requests and that I use the issue tracker for bug reports and proposals only. Please ask questions on the [https://kataras.rocket.chat/channel/iris][Chat] or [http://stackoverflow.com/](http://stackoverflow.com).
+If you wanna contribute please submit a PR to one of the [iris-contrib organisation's](https://github.com/iris-contrib) projects.
+
+##### Note that I do not accept pull requests here and that I use the issue tracker for bug reports and proposals only. Please ask questions on the [https://kataras.rocket.chat/channel/iris][Chat] or [http://stackoverflow.com/](http://stackoverflow.com).
## Before Submitting an Issue
@@ -1,4 +1,4 @@
-- Version : **5.0.4**
+- Version : **6.0.0**
- Operating System:
@@ -1,5 +1 @@
If you are interested in contributing to the Iris project, please see the document [CONTRIBUTING](https://github.com/kataras/iris/blob/master/.github/CONTRIBUTING.md).
-
-##### Note that I do not accept pull requests and that I use the issue tracker for bug reports and proposals only. Please ask questions on the [https://kataras.rocket.chat/channel/iris][Chat] or [http://stackoverflow.com/](http://stackoverflow.com).
-
-[Chat]: https://kataras.rocket.chat/channel/iris
View
@@ -1,11 +1,6 @@
I spend all my time in the construction of Iris, therefore I have no income value.
-If you,
-
-- think that any information you obtained here is worth some money
-- believe that Iris worths to remains a highly active project
-
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)
@@ -27,41 +22,41 @@ I'm grateful for all the generous donations. Iris is fully funded by these dona
#### Donations
-- ASKED FOR ANONYMITY* donated 50 EUR at May 11
+- ANONYMOUS 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
-- ANONYMOUS(Waiting For Approval)* donated 6 EUR at October 1
+- ANONYMOUS donated 6 EUR at October 1
- [Ankur Srivastava](https://github.com/ansrivas) donated 20 EUR at October 2
-- ANONYMOUS(BY OWN WILL)* donated 100 EUR at October 18
+- ANONYMOUS donated 100 EUR at October 18
-- ANONYMOUS(Waiting For Approval) donated 20 EUR at October 19
+- ANONYMOUS donated 20 EUR at October 19
- [Damon Zhao](https://github.com/se77en) donated 20 EUR at October 21
-- ANONYMOUS(BY OWN WILL)* donated 50 EUR at October 21
+- ANONYMOUS donated 50 EUR at October 21
- [exponity - consulting & digital transformation](https://github.com/exponity) donated 30 EUR at November 4
-- ANONYMOUS(BY OWN WILL)* donated 50 EUR at December 7
+- ANONYMOUS donated 50 EUR at December 7
-- ANONYMOUS(Waiting For Approval)* donated 20 EUR at December 9
+- ANONYMOUS donated 20 EUR at December 9
-- ANONYMOUS(Waiting For Approval)* donated 5 EUR at December 13
+- ANONYMOUS donated 5 EUR at December 13
> * The name or/and github username link added after donator's approvement via e-mail.
#### Report, so far
- 13 EUR for the domain, [iris-go.com](https://iris-go.com)
+- **Thanks** to all of **You**, 424 EUR donated to [Holy Metropolis of Ioannina](http://www.imioanninon.gr/main/) for clothes, foods and medications for our fellow human beings.
-**Available**: VAT(50) + VAT(20) + VAT(20) + VAT(50) + VAT(6) + VAT(20) + VAT(100) + VAT(20) + VAT(20) + VAT(50) + VAT(30) + VAT(50) + VAT(20) + VAT(5) - 13 = 47,45 + 18,97 + 18,61 + 47,05 + 5,34 + 18,97 + 98,04 + 18,97 + 18,61 + 47,95 + 28,24 + 47,05 + 18,97 + 4,59 - 13 =
-424,92 EUR
-**All donations so far and until the end of this month(01/01/2017), will go back to the people who need them most, they are not enough but I will try to raise the amount by myself too.**
+**Available**: VAT(50) + VAT(20) + VAT(20) + VAT(50) + VAT(6) + VAT(20) + VAT(100) + VAT(20) + VAT(20) + VAT(50) + VAT(30) + VAT(50) + VAT(20) + VAT(5) - 13 = 47,45 + 18,97 + 18,61 + 47,05 + 5,34 + 18,97 + 98,04 + 18,97 + 18,61 + 47,95 + 28,24 + 47,05 + 18,97 + 4,59 - 13 - 424 =
+424,92 EUR - 424 = **0,92**
View
@@ -2,6 +2,58 @@
**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`.
+
+## v5/fasthttp -> 6.0.0
+
+As I [promised to the community](https://github.com/kataras/iris/issues/565) and a lot others, HTTP/2 support on Iris is happening!
+
+I tried to minimize the side affects.
+
+If you don't find something you used to use come here and check that conversional list:
+
+- `context.Response.BodyWriter() io.Writer` -> `context.ResponseWriter` is a http.ResponseWriter(and io.Writer) now.
+
+- `context.RequestCtx` removed and replaced by `context.ResponseWriter (*iris.ResponseWriter -> http.ResponseWriter)` and `context.Request (*http.Request)`
+
+- `context.Write(string, ...string)` -> `context.Writef(string, ...string)` | Write now has this form: Write([]byte) (int,error). All other write methods didn't changed.
+
+- `context.GetFlash/SetFlash` -> `context.Session().GetFlash/GetFlashString/SetFlash/DeleteFlash/ClearFlashes/Flashes/HasFlash`.
+
+- `context.FormValueString(string)` -> `context.FormValue(string)`.
+- `context.PathString()` -> `context.Path()`.
+- `context.HostString()` -> `context.Host()`.
+
+- `iris.Config.DisablePathEscape` was removed because now we have two methods to get a parameter `context.Param/ParamDecoded`.
+
+
+- All net/http middleware/handlers are **COMPATIBLE WITH IRIS NOW**, read more there](https://github.com/iris-contrib/middleware/blob/master/README.md#can-i-use-standard-nethttp-handler-with-iris).
+
+
+**Static methods changes**
+
+- `iris.StaticServe/StaticContent/StaticEmbedded/Favicon stay as they were before this version.`.
+
+- `iris.StaticHandler(string, int, bool, bool, []string) HandlerFunc` -> `iris.StaticHandler(reqPath string, systemPath string, showList bool, enableGzip bool) HandlerFunc`.
+
+
+- `iris.StaticWeb(string, string, int) RouteNameFunc` -> `iris.StaticWeb(routePath string, systemPath string) RouteNameFunc`.
+- `iris.Static` -> removed and joined to the new iris.StaticHandler
+- `iris.StaticFS` -> removed and joined into the new `iris.StaticWeb`.
+
+
+
+**More on Transictions vol 4**:
+
+- Add support for custom `transactions scopes`, two scopes already implemented: `iris.TransientTransactionScope(default) and iris.RequestTransactionScope `
+
+- `ctx.BeginTransaction(pipe func(*iris.TransactionScope))` -> `ctx.BeginTransaction(pipe func(*iris.Transaction))`
+
+- [from](https://github.com/iris-contrib/examples/blob/5.0.0/transactions/main.go) -> [to](https://github.com/iris-contrib/examples/blob/master/transactions/main.go). Further research `context_test.go:TestTransactions` and https://www.codeproject.com/Articles/690136/All-About-TransactionScope (for .NET C#, I got the idea from there, it's a unique(golang web) feature so please read this before use transactions inside iris)
+
+
+[Examples](https://github.com/iris-contrib/examples/tree/master), [middleware](https://github.com/iris-contrib/middleware/tree/master) & [plugins](https://github.com/iris-contrib/plugin) were been refactored for this new (net/http2 compatible) release.
+
+
## 5.1.1 -> 5.1.3
- **More on Transactions vol 3**: Recovery from any (unexpected error) panics inside `context.BeginTransaction` without loud, continue the execution as expected. Next version will have a little cleanup if I see that the transactions code is going very large or hard to understand the flow*
View
@@ -1,31 +1,21 @@
-Copyright (c) 2016 Gerasimos Maropoulos.
-All rights reserved.
+The MIT License (MIT)
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
+Copyright (c) 2016-2017 Gerasimos Maropoulos
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-2. Redistributions in binary form must reproduce the above copyright notice, this
-list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-3. Neither the name of the copyright holder nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
-AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
Oops, something went wrong.

0 comments on commit 8bbd9f8

Please sign in to comment.