Letian Zhang
8cabd1e123
don't make router parse duplicated param when backtracing happens #1368 ( #1369 )
2019-07-25 13:39:03 -07:00
Vishal Rana
207a141d5d
Closed #1348
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-07-17 21:18:56 -07:00
Vishal Rana
ae55310e59
Merge branch 'master' of https://github.com/meehow/echo into meehow-master
2019-07-17 18:31:55 -07:00
kolaente
610d67f17f
Added support for the REPORT method ( #1332 )
2019-06-09 09:11:18 -07:00
Vishal Rana
5d2c33ad5d
Bumped v4.1.5
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-29 22:54:49 -07:00
Vishal Rana
6f0a227a5a
Built-in capability to run multiple hosts
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-28 22:22:35 -07:00
Michał Adamski
e1d21a73cf
tests and fix for findChildByKind executed on nil node
2019-03-01 08:27:11 +01:00
Geon Kim
82917fd848
Delete useless goto statements ( #1208 )
2018-10-15 09:12:43 +05:30
Emir Ribić
c8fd197fa8
Replace http constants with stdlib ones, i.e.: http.MethodGet instead of echo.GET ( #1205 )
2018-10-14 20:46:58 +05:30
Shogo Nagasaka
af5c97715f
Fix node's parameter names assignment problem. ( #1201 )
2018-10-07 08:34:30 +05:30
Vishal Rana
7c3df7703f
Revert "Allow parameter routes to end with a dot (/foo/:id.json)"
...
This reverts commit bfa14633f3
.
2018-04-11 22:34:26 -07:00
Vishal Rana
28d07c3bca
Revert "Fix parameter routes with an extension (/foo/:id.json)"
...
This reverts commit cf7b55584d
.
2018-04-11 22:34:26 -07:00
Vishal Rana
a8aaeb8a26
Revert "Revert "Fix parameter routes with an extension (/foo/:id.json)""
...
This reverts commit f526774740
.
2018-04-11 22:34:26 -07:00
Vishal Rana
f526774740
Revert "Fix parameter routes with an extension (/foo/:id.json)"
...
This reverts commit cf7b55584d
.
2018-04-11 22:32:19 -07:00
Martin Tournoij
cf7b55584d
Fix parameter routes with an extension (/foo/:id.json)
...
This is a follow-up to #1101 . It turns out that that patch is
incomplete, as a similar check also needs to be added in the
`Router.Add()` method.
I don't understand why the test works fine, but when using it in a real
application. For example with this example:
func main() {
e := echo.New()
e.GET("/xxx/:id.json", func(c echo.Context) error {
return c.String(200, fmt.Sprintf("%#v: names: %#v; vals: %#v",
c.Path(), c.ParamNames(), c.ParamValues()))
})
log.Fatal(e.Start(":8000"))
}
Gives a 404 on `/xxx/42.json`, and for `/xxx/42` it gives the output:
/xxx/:id.json": names: []string{"id.json"}; vals: []string{"42"}
It makes sense to add the test there too; I just don't get why the test
cases that I added in ##1101 *does* produce the correct output :-/
2018-04-10 14:54:01 -07:00
Martin Tournoij
bfa14633f3
Allow parameter routes to end with a dot (/foo/:id.json)
...
Currently a route in the form of `/foo/:id.json` means echo will detect
the parameter name `id.json` instead of the expected `id`. I think this
is rather counter-intuitive, as adding an extension to paths is a fairly
common use case.
With this change both a `/` and a `.` will be treated as the end of a
parameter name.
Benchmark before this change:
$ go test -bench .
[..]
goos: linux
goarch: amd64
pkg: github.com/labstack/echo
BenchmarkRouterStaticRoutes-4 100000 17743 ns/op 0 B/op 0 allocs/op
BenchmarkRouterGitHubAPI-4 50000 33081 ns/op 1 B/op 0 allocs/op
BenchmarkRouterParseAPI-4 300000 5370 ns/op 0 B/op 0 allocs/op
BenchmarkRouterGooglePlusAPI-4 200000 9183 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/labstack/echo 8.565s
After this change:
goos: linux
goarch: amd64
pkg: github.com/labstack/echo
BenchmarkRouterStaticRoutes-4 100000 17699 ns/op 0 B/op 0 allocs/op
BenchmarkRouterGitHubAPI-4 50000 32962 ns/op 1 B/op 0 allocs/op
BenchmarkRouterParseAPI-4 300000 5450 ns/op 0 B/op 0 allocs/op
BenchmarkRouterGooglePlusAPI-4 200000 9205 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/labstack/echo 8.590s
Fixes #599
2018-04-10 11:37:35 -07:00
Vishal Rana
bdb49be734
Added PROPFIND method
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-03-13 12:45:47 -07:00
Vishal Rana
4f3080c197
Bit of more cleanup
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-02-21 11:38:22 -08:00
Evgeniy Kulikov
f49d166e6f
[FIX] Cleanup code ( #1061 )
...
Code cleanup
2018-02-21 10:44:17 -08:00
Vishal Rana
ec048ea523
Fixed #1052 , dropped param alias feature
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-01-30 19:02:29 -08:00
Vishal Rana
1b70cbebbe
Fixed #954
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-14 16:30:53 -07:00
Vishal Rana
a8cd0ad133
Closes #942
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-02 18:13:26 -07:00
Vishal Rana
3359eae306
Add json tags to route struct
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-16 16:29:33 -07:00
Vishal Rana
d5bff83dc3
Using *context instead of Context in Router#Find()
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-04-10 13:10:31 -07:00
Ole Bulbuk
f0e3f950cf
Tested and fixed bug with reused context (path parameters).
2017-03-30 12:05:24 +02:00
Vishal Rana
a098bcd3b0
Updated docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-19 13:02:10 -08:00
Diego Siqueira
a8b6864be3
Two little typos on comments ( #835 )
2017-02-02 11:50:17 -08:00
Vishal Rana
c7c4395fbd
Fixed #794
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-31 13:55:39 -08:00
Vishal Rana
fd9508ca39
param alias, context#param
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-17 18:42:00 -08:00
Vishal Rana
f9e97332f3
fixed #729
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-15 20:12:13 -08:00
Vishal Rana
c5a3575d4c
updated migration guide
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-14 22:54:09 -08:00
Vishal Rana
36251e88e2
router changes
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-21 20:36:49 -07:00
Vishal Rana
2bdbf6918e
fixed #623
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-14 14:52:40 -07:00
Vishal Rana
2eb87f8036
param wildcard capture fixed to *
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-10 18:36:48 -07:00
Vishal Rana
18b9e23ace
Closes #364
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-18 11:27:37 -07:00
Vishal Rana
451b2ccc9f
Exposed error handlers
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-05 08:43:46 -07:00
Vishal Rana
c24f06e7cb
Fixed #520
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-22 08:45:36 -07:00
Vishal Rana
682a5580b7
Deprecated Echo#GetContext() => Echo#AcquireContext(), Echo#PutContext() => Echo#ReleaseContext()
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-03 17:23:31 -07:00
Vishal Rana
1e04986e53
Var args for Context#SetParamNames and Context#SetParamValues.
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-17 09:41:20 -07:00
Vishal Rana
467cf05b41
Changes based on comments for #430
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-16 15:56:09 -07:00
Vishal Rana
94a16d25a3
Fixed #461
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-11 23:21:32 -07:00
Vishal Rana
33700bfcc2
Fixed #457
...
- Dropped static middleware in favor of Echo#Static & Echo#StaticConfig.
- Enhanced middleware chaining.
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-09 14:00:23 -07:00
Vishal Rana
b5d6c05101
Fixed #441 , #294
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-02 14:24:51 -07:00
Vishal Rana
a7d1a8e0d1
Refactored some code
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-30 14:47:04 -07:00
Vishal Rana
c4caeb8ffb
more godoc
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-19 15:47:20 -07:00
Vishal Rana
f78c0662c1
Fixed #404
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-16 14:26:34 -07:00
Vishal Rana
34e964851f
Closes #283
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-08 19:40:25 -08:00
Vishal Rana
296498c942
Fixed nested groups, reset Context#handler
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-08 19:31:11 -08:00
Vishal Rana
4f08fed018
Fixed #378
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-06 23:24:51 -08:00
Vishal Rana
d5ba76ed81
Router fix, #217 , #371 , #372 .
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-03 22:06:47 -08:00