1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-01 05:20:53 +00:00
Commit Graph

318 Commits

Author SHA1 Message Date
astaxie
90999717dd Merge branch 'develop' 2016-12-05 23:14:26 +08:00
Maxim Sukharev
683e6856ef Add RouterPattern to context.Input
Right now beego adds this param only in dev mode, but I noticed that it's very useful to have in prod environment to.
My current use case - filter that sends logs in newrelic. Pattern there will help a lot to generate correct transaction name.
2016-10-28 10:44:16 +07:00
olegdemchenko
0be05eb47c policies implementation 2016-09-28 21:21:07 +03:00
astaxie
868e14b8ba fix #2017 2016-09-15 20:04:45 +08:00
astaxie
421bf97b84 Support custome recover func fix #2004 2016-09-15 12:16:24 +08:00
astaxie
2b7dd85b92 access log add client request ip 2016-09-15 10:58:46 +08:00
astaxie
dd0f05b1f1 fix the method color 2016-09-11 22:00:14 +08:00
astaxie
7760d24761 fix the typo 2016-08-17 23:52:34 +08:00
dan pittman
0e786fa4af
adds ability to reset params after a filter runs
When a filter is run _after_ the router completes, it's input params,
such as `":splat"` will have been overwritten by the filter's router pass.
This commit adds the ability to tell the router to revert to the previous input
params after running a filter.
2016-08-07 07:44:30 -07:00
astaxie
3ca68f9e30 Merge pull request #1976 from ysqi/develop
Fxied bug and Optimized code
2016-08-02 09:58:58 +08:00
Faissal Elamraoui
479dfdbd40 added support for Windows terminals 2016-06-24 15:38:18 +02:00
Faissal Elamraoui
2bd743fcff Enhanced logging during DEV mode 2016-06-17 15:56:52 +02:00
ysqi
2c1cea08dd New func to find router info for context 2016-06-05 14:03:20 +08:00
ysqi
b807362c39 Reset 2016-06-01 20:33:10 +08:00
ysqi
d9b05e6b3f Print complete URL after running 2016-06-01 20:18:11 +08:00
JessonChan
98dfecfd8a change beego log function to logs function 2016-03-24 17:39:29 +08:00
astaxie
6c0979c314 Merge pull request #1805 from JessonChan/abort_panic_bug
Abort panic bug
2016-03-23 10:22:32 +08:00
JessonChan
0859ec570c refactor of error response and fix err code bug 2016-03-17 09:46:34 +08:00
JessonChan
94599013fc url to lower case 2016-03-16 07:53:36 +08:00
JessonChan
565c4a4d59 make the code run more fast 2016-03-15 18:50:18 +08:00
JessonChan
34615ee8fc add router filter enable flag 2016-03-15 18:37:54 +08:00
JessonChan
c51bc86d3f goto bug fixed 2016-03-15 16:51:21 +08:00
JessonChan
8660a54fac make router fast 2016-03-15 11:49:23 +08:00
astaxie
c8bbfb75f0 Merge pull request #1782 from JessonChan/some_wip
BeeLogger can be the writer of  http server's log
2016-03-14 14:47:29 +08:00
astaxie
d90195061f fix #1783 2016-03-13 11:16:19 +08:00
JessonChan
9872041f12 timeDur is used only when need 2016-03-11 14:14:58 +08:00
JessonChan
8c37e76503 the net/http should set header first,the set http status code and then write the content 2016-02-24 14:14:16 +08:00
JessonChan
76d69b6e51 prevent auto detect of content-type
https://golang.org/src/net/http/server.go#L1031
2016-02-24 10:34:20 +08:00
nemtsevp
93b04e8a3b Exceptions in controller methods
Exceptions in methods names should be changed according to controller.go
2016-01-21 09:44:17 +03:00
astaxie
23bb36d35c fix the issue #1573 2016-01-18 23:29:56 +08:00
astaxie
fa8f6e5a53 session destroy 2016-01-18 16:11:27 +08:00
youngsterxyf
ac3b013de7 DRY 2016-01-18 15:17:42 +08:00
astaxie
f925bb9058 golint all the files 2016-01-18 00:18:21 +08:00
astaxie
6660720ce6 update some config name 2016-01-12 21:55:02 +08:00
astaxie
73168d2f7d Merge pull request #1527 from JessonChan/develop
reuse compress writer
2016-01-04 14:36:40 +08:00
JessonChan
fd2ded190b EnableGzip bug fixed 2016-01-04 09:27:58 +08:00
astaxie
6585e66f97 all the browser should support delete and put now 2016-01-03 20:36:16 +08:00
JessonChan
3ebf275157 fixed camel style name 2016-01-03 15:40:44 +08:00
Vitaly Velikodny
48fd9675ad Refactoring: Move dev & prod runmodes to const 2015-12-29 21:32:37 +03:00
astaxie
2aa50c240f Merge pull request #1486 from KilledKenny/oomDos
Added MaxMemory limit to CopyBody() Supersedes #1484
2015-12-16 23:44:42 +08:00
astaxie
29752e2575 refactor router 2015-12-16 23:11:03 +08:00
Simon Rawet
52c4c1fb98 Added MaxMemory limit to CopyBody()
Beego only uses the MaxMemory flag when using go's built in functions
for parsing forms. However the CopyBody() function have no limit an will
coppy anny amount of data into memory using ioutil.ReedAll() on the
request body whitout anny size validation or limit.

This fix wrapps input.Requst.Body in a LimitedReader using the same
memory limit as ParseFormOrMulitForm()
2015-12-16 10:37:21 +01:00
astaxie
2b651fbae2 reuse map in tree.Match 2015-12-11 13:51:01 +08:00
astaxie
80bc372f17 pool.Put 2015-12-11 00:20:17 +08:00
astaxie
f70f338025 use sync.Pool to reuse Context 2015-12-10 21:59:54 +08:00
astaxie
be60f47488 Merge pull request #1455 from nkbai/develop
windows下静态文件映射找不到问题以及 grace init延后
2015-12-09 23:44:45 +08:00
astaxie
d1bba02958 refact beego config 2015-12-09 23:35:04 +08:00
nkbai
ff0762cc19 Merge remote-tracking branch 'upstream/develop' into develop 2015-12-03 15:50:21 +08:00
nkbai
6aaca2eca8 router.go Header 毫无用处
context/output.go 简化一下代码,更清晰
2015-11-26 14:56:39 +08:00
JessonChan
7ef9b3d55b runnable typo fixed 2015-11-10 14:07:26 +08:00
astaxie
fd4630c6dd impove the ResponseWriter. fix #1410 2015-11-04 23:52:42 +08:00
astaxie
912abe3272 fix #1388 2015-10-12 21:26:18 +08:00
JessonChan
caf3714495 revert exceptMethod 2015-09-19 05:41:10 +08:00
JessonChan
983bac986a runFunction camel name 2015-09-18 18:34:07 +08:00
JessonChan
56032c67af runFunction camel name 2015-09-18 18:31:06 +08:00
JessonChan
40cb8e0cf1 use reflect to ensure all methods been except 2015-09-18 18:18:12 +08:00
astaxie
ff5b09fc19 golint context 2015-09-10 15:31:09 +08:00
astaxie
c11740b647 make golint happy router.go 2015-09-08 22:01:13 +08:00
astaxie
67b36d7c48 make golint happy 2015-09-08 21:41:38 +08:00
astaxie
61570ac2f7 make golint happy with controller.go 2015-09-08 10:43:42 +08:00
astaxie
f28a941e26 make golint happy and also make the config readable 2015-09-07 23:19:42 +08:00
陈小玉
506f54a080 Update router.go, add Flush for responseWriter 2015-08-19 15:23:50 +08:00
JessonChan
b26ef5b2e5 typo fixed
registor==>register
innner ==> inner
2015-07-27 08:44:58 +08:00
MrLee.Kun
87e8bcc9be fix FilterHandler crash issue
Filter Handler will crash with error assignment to entry in nil map , params from function Tree.Match() maybe nil.
2015-06-19 11:19:35 +08:00
astaxie
ba1232dfaf filter should be always the same 2015-06-14 18:35:46 +08:00
astaxie
b275d7c6f5 Revert "Revert "fix multiple filters execute issue"" 2015-06-14 01:14:33 +08:00
astaxie
fc11169ee3 Revert "fix multiple filters execute issue" 2015-06-14 01:13:34 +08:00
MrLee.Kun
2af0c569a5 The last filterFunc with returnOnOutput=ture won't be executed
ex:
	beego.InsertFilter("/*", beego.BeforeExec, FilterLoginCheck1,false)
	beego.InsertFilter("/*", beego.BeforeExec, FilterLoginCheck2)

In function  FilterLoginCheck1 , I'll write data via ResponseWriter, and w.started = true
FilterLoginCheck2 won't be executed, it should be.
2015-06-14 01:02:41 +08:00
astaxie
e619d83990 fix the filter router issues 2015-06-13 12:47:01 +08:00
MrLee.Kun
491238ce7d Don't overwrite the params from function ValidRouter
just add new params to context.Input.Params
2015-06-13 01:04:46 +08:00
astaxie
4d70b22f96 Merge pull request #1157 from ziyel/master
Let filter function get more params info from ctx.Input.Params
2015-06-11 14:38:19 +08:00
ziyel
d943d16d52 gofmt 2015-06-10 21:26:04 +08:00
astaxie
364cacf659 record the critical logs in Prod 2015-06-08 22:00:28 +08:00
astaxie
26130a5df6 fix #1073 2015-05-25 09:10:35 +08:00
astaxie
1d8afdc9c9 gofmt -s & go_vet 2015-05-25 09:10:34 +08:00
ziyel
9bb9855153 Let filter function get more params info from ctx.Input.Params 2015-05-18 14:42:18 +08:00
astaxie
3aceaf8838 error support controller 2015-02-26 23:34:43 +08:00
astaxie
3caba06189 Merge pull request #967 from athurg/support_all_type_on_urlfor
Add all type support for UrlFor’s params
2014-12-18 21:14:44 +08:00
Jianbo Feng
e34f8479bb Add all type support for UrlFor’s params 2014-12-17 15:52:48 +08:00
astaxie
9c665afc04 improve the error tips 2014-12-08 14:57:45 +08:00
astaxie
f96245786a fix #912 2014-11-08 15:10:47 +08:00
astaxie
76522d43af simple the session 2014-11-04 19:07:49 +08:00
astaxie
c4d8e4a244 fix #759 2014-11-04 15:29:33 +08:00
astaxie
8d797a4a5e file the static filter 2014-11-03 16:14:40 +08:00
astaxie
fda841208d fix #893 2014-10-30 16:05:48 +08:00
WithGJR
efc14a1e8d fix router bug with more better way 2014-10-16 18:58:12 +08:00
WithGJR
fa1281002e fix router bug: when the request is PUT or DELETE, router can't find the actual route and will throw 404 page to user 2014-10-16 18:26:01 +08:00
Bill Davis
1ba7847913 Changing check from nil to len based on slice 2014-10-08 09:21:34 -04:00
Bill Davis
b6f789c497 Changes to handle multi filters on execution pt 2014-10-07 16:35:30 -04:00
astaxie
aae89576c6 fix #814 2014-10-01 22:31:44 +08:00
astaxie
a907a86476 fix #814 2014-10-01 22:28:49 +08:00
astaxie
3a5de83ec2 beego: support router case sensitive 2014-09-28 22:10:43 +08:00
astaxie
f267ee8a12 fix the same name controller for UrlFor 2014-09-23 00:26:07 +08:00
astaxie
6eee223352 beego: fix the Upper for the _method value 2014-09-03 09:25:34 +08:00
Francois
bc4780091b Proposal for adding a ":" for stack trace printout
Mainly useful for Sublime users with goto anything.
2014-08-30 21:27:21 +02:00
astaxie
7f977a0c8c beego: change the colour 2014-08-20 11:54:25 +08:00
astaxie
aaabeff44f change the route info 2014-08-20 10:59:38 +08:00
astaxie
a144769515 update the documents & comments 2014-08-18 16:41:43 +08:00
astaxie
e07d780dcf update the router info 2014-08-18 15:00:27 +08:00
astaxie
986e91b7d6 beego: update the debug info rules 2014-08-18 14:35:43 +08:00