1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-18 02:50:56 +00:00
Commit Graph

47 Commits

Author SHA1 Message Date
wang yan
a768bf8f00 update hash algorithm for signing the cookie for xsrf token
Due to the chosen-prefix collision in SHA-1(details at https://sha-mbles.github.io/), SHA-1 hash functions should to be deprecated and SHA-2/SHA-3 should be used instead.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-02-06 17:31:24 +08:00
Wenkai Yin
793047097c Abort with the pre-defined status code when handling XSRF error
As the status codes(422 and 417) are set in the error map, abort with them directly to active the pre-defined error handlers

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-11-19 18:55:54 +08:00
wanghui
b021686521
Add .Elapsed in context.ResponseWriter for monitor purpose
With this commit we can record per requests's elapsed time,
so we can easy to monitor that by use a filter.
2018-11-19 16:38:14 +08:00
Ruben Cid
5c407ff2e3 Add map shortcut and ServeFormatted method in output 2018-08-20 22:55:50 +02:00
Ruben Cid
48e6658eca Add access to pusher 2018-08-03 12:33:46 +02:00
Eyal Post
828cbbdf5d Refactor a bit to consolidate packages 2017-05-17 20:38:59 +03:00
astaxie
cef91db28e Merge pull request #1956 from gitchs/master
Ctx.Redirect patch
2016-05-23 13:50:59 +08:00
tinyproxy
f32392e956 net/http will do it better 2016-05-21 15:19:21 +08:00
JessonChan
301dcfb626 context xsrf bug fixed 2016-04-08 14:04:10 +08:00
JessonChan
b2098266a3 add error test 2016-03-22 18:27:29 +08:00
astaxie
d90195061f fix #1783 2016-03-13 11:16:19 +08:00
astaxie
31f7524dae fix the golint travis 2016-03-10 21:47:50 +08:00
JessonChan
f21cff0166 some typo fixed 2016-03-09 16:00:52 +08:00
JessonChan
3dd9020249 Merge remote-tracking branch 'remotes/upstream/develop' into err_ctrler 2016-03-09 15:59:13 +08:00
JessonChan
9a2696d216 accept asta's idea see the talk
https://github.com/astaxie/beego/pull/1719
2016-03-09 15:56:18 +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
20301bc212 multiple response.WriteHeader calls 2016-02-24 10:31:44 +08:00
ysqi
810f6db8d2 fix #1669 write empty body panic error 2016-02-12 11:27:59 +08:00
astaxie
351dfac653 context.Response should implement Hijack/Flush/CloseNotify 2015-12-21 22:51:18 +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
dc3e324f38 Merge pull request #1418 from ElvizLai/patch-1
Update context.go
2015-11-05 22:39:34 +08:00
Yongzheng Lai
b8fc42d38d Update context.go
all this status was setting in error.go, this line will cause multi-resp
2015-11-05 21:20:57 +08:00
astaxie
ff5b09fc19 golint context 2015-09-10 15:31:09 +08:00
astaxie
e938876c4a fix the cycle import 2015-02-27 00:12:10 +08:00
astaxie
3aceaf8838 error support controller 2015-02-26 23:34:43 +08:00
fuxiaohei
24cf06d288 code style simplify for context package 2015-02-23 11:15:55 +08:00
astaxie
ecd0a5487e fix the import cycle not allowed 2014-10-30 16:12:54 +08:00
astaxie
fda841208d fix #893 2014-10-30 16:05:48 +08:00
astaxie
80274684e0 context: redirect should writer to response instantly 2014-08-19 09:48:21 +08:00
astaxie
a144769515 update the documents & comments 2014-08-18 16:41:43 +08:00
astaxie
ab71201c96 Merge pull request #741 from smallfish/master
Update ctx.WriteString multiple buf output
2014-08-14 23:56:20 +08:00
smallfish
75e2611cc4 Update ctx.WriteString multiple buf output 2014-08-14 21:37:52 +08:00
astaxie
ee9749d640 beego:fix #685
move XsrfToken& CheckXsrfCookie to context
2014-07-24 23:12:21 +08:00
astaxie
91ee42ceeb beego:update the Abort Status 2014-07-18 15:38:29 +08:00
astaxie
fefd8ddb5b beego: update licence& fix #669 2014-07-03 23:40:21 +08:00
astaxie
0f170a80da update the comments fix #658 2014-06-25 10:39:37 +08:00
astaxie
c188cbbcb4 update all files License 2014-05-17 02:26:50 +08:00
slene
d8b9db8d3e move SetSecureCookie / GetSecureCookie to *context.Context and alias in Controller 2014-03-12 15:56:04 +08:00
傅小黑
f535916fae add comments for context package. 2013-12-25 20:13:38 +08:00
Pengfei Xue
65b9011bc1 delete write body from context.Redirect 2013-12-17 08:18:01 +08:00
astaxie
f8708d01bf update abort & error show & sessionRelease in defer 2013-12-16 22:54:29 +08:00
astaxie
3c91360d72 dictinct system pkg and third pkg 2013-12-03 21:37:39 +08:00
astaxie
ae2e25f4c2 fix #316 2013-11-26 11:05:49 +08:00
Pengfei Xue
76c0636125 beego.Context.Abort return immediately
* add common 4XX/5XX HTTP exceptions
2013-11-26 08:46:46 +08:00
astaxie
bd61dd9ffc change a log about new version 2013-09-10 00:00:18 +08:00
astaxie
ac8853dfd3 move from beehttp to context 2013-08-21 17:59:31 +08:00