1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 22:11:29 +00:00
Commit Graph

200 Commits

Author SHA1 Message Date
kbynd
2f6da122fd Update output.go 2017-01-02 09:17:17 +05:30
kbynd
f0d1d7149b Update output.go 2016-12-31 16:14:38 +05:30
kbynd
96387e9a9b EnableGZip=true,then content-length header missing
This results in responses with Content-Type as gzip as opposed to original content type.
This affects ServeJSON() function.
2016-12-31 16:04:34 +05:30
astaxie
868e14b8ba fix #2017 2016-09-15 20:04:45 +08:00
YakunZ
0ad4038d9f fix#2039 & test 2016-08-24 16:04:22 +08:00
astaxie
8b525b1aa5 fix #1656 2016-08-19 00:31:46 +08:00
astaxie
86b3162aff fix #1695 update docs 2016-08-19 00:11:19 +08:00
astaxie
61c9387edd Merge pull request #2085 from danielscottt/reset-params
adds ability to reset params after a filter runs
2016-08-09 07:24:08 +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
01c3812520 Merge pull request #2086 from Maxgis/issue_accept_encoding
Refactoring
2016-08-07 16:25:51 +08:00
maxin
ce6f19871c Refactoring 2016-08-06 21:13:58 +08:00
astaxie
ce6d673933 Merge pull request #2045 from Maxgis/master
avoid  error when the  callback function not exisit
2016-08-02 09:50:52 +08:00
Maxgis
5485e1334f remove not support encoding 2016-07-27 09:31:53 +08:00
simsun
ee26279311
fix(context): retrieve scheme from X-Forwarded-Proto when it isn't none 2016-07-19 00:36:51 +08:00
maxin[马鑫]
8099a81b7a avoid error when the callback function not exisit 2016-07-15 19:13:35 +08: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
ysqi
830985b90b QueryEscape Download File Name 2016-04-27 22:05:31 +08:00
JessonChan
ed0e6419f0 context xsrf test 2016-04-08 14:07:39 +08:00
JessonChan
a99c0d4025 context xsrf test 2016-04-08 14:04:25 +08:00
JessonChan
301dcfb626 context xsrf bug fixed 2016-04-08 14:04:10 +08:00
astaxie
52fbab329d Merge pull request #1844 from mishudark/master
delete not used variable (status int) in output.go functions
2016-03-30 15:44:32 +08:00
mishudark
eae2147735 chore(output.go): delete not used variable (status int) in check status functions 2016-03-29 23:28:53 -06:00
astaxie
70108131e6 Merge pull request #1832 from JessonChan/log_enhancement
Log enhancement
2016-03-25 21:12:06 +08:00
JessonChan
2db8c753fd bee fix 2016-03-25 10:56:15 +08:00
YuShuangqi
b7d1afbf86 Remote empty line 2016-03-24 08:35:42 +08:00
ysqi
1eab11ca90 fixed #1815 check file before download 2016-03-23 21:27:28 +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
b2098266a3 add error test 2016-03-22 18:27:29 +08:00
JessonChan
7bad3d1c67 change the compress leve to [0~9] 2016-03-22 16:47:11 +08:00
JessonChan
4db78f243e change the function args of init gzip method 2016-03-22 16:42:42 +08:00
JessonChan
959b9a5a58 config index out of range bug fixed 2016-03-21 09:32:41 +08:00
JessonChan
4caf044be2 getMethodOnly assign fixed 2016-03-18 15:18:00 +08:00
JessonChan
9f21928a90 some typo fixed 2016-03-17 20:07:24 +08:00
JessonChan
57eace07a7 comment update 2016-03-17 19:52:09 +08:00
JessonChan
35e34261ab gzip method support 2016-03-17 19:40:29 +08:00
JessonChan
48147f50d8 add some gzip future 2016-03-17 19:09:21 +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
astaxie
5698b5dc92 Merge pull request #1709 from mlgd/develop
Fix cookies in accordance with the "net / http" and Flash usage
2016-03-08 13:53:43 +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
Mickaël GALLARD
9119f766d2 Fix cookies in accordance with the "net / http" and Flash usage
Fixed issue of Flash cookies that are deleted before being read
Max-age parameter conform to "net/http" Cookie
2016-02-22 13:35:54 +01:00
ysqi
d35c50a8e0 return write body error 2016-02-12 11:36:25 +08:00
ysqi
810f6db8d2 fix #1669 write empty body panic error 2016-02-12 11:27:59 +08:00
Pelle Johnsen
453d744db9 Fix Context.Input.SetParam not overwriting existing value
- Also added tests for Context.Input.Param handling
2016-01-27 14:58:50 +01:00
astaxie
f925bb9058 golint all the files 2016-01-18 00:18:21 +08:00
astaxie
9adf20d72e gofmt -s 2016-01-17 23:57:07 +08:00
astaxie
5b028796b8 fix the test case for input 2016-01-08 16:24:59 +08:00
astaxie
9167587929 add Params for input 2016-01-08 01:20:34 +08:00
JessonChan
d23291ccc7 remove a dump err 2016-01-04 08:50:59 +08:00
JessonChan
ee2322e83b add any level compress 2016-01-03 15:35:32 +08:00
JessonChan
59fa248292 use sync.Pool to decrease new compression writer 2015-12-31 18:50:52 +08:00
astaxie
25337aec27 Merge branch 'develop' of https://github.com/astaxie/beego into develop 2015-12-21 22:54:22 +08:00
astaxie
351dfac653 context.Response should implement Hijack/Flush/CloseNotify 2015-12-21 22:51:18 +08:00
fud
92711e80a3 refactor controller.go 2015-12-21 16:23:31 +08:00
JessonChan
80ac8aa40e compress level test fixed 2015-12-18 09:28:40 +08:00
astaxie
c3d1e4d088 Revert "go test fixed" 2015-12-17 14:45:10 +08:00
JessonChan
8771634fe4 Merge remote-tracking branch 'remotes/upstream/develop' into develop 2015-12-17 09:25:15 +08: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
dbc4ac6945 reduce the slicegrow 2015-12-16 23:43:32 +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
JessonChan
ccc008c257 compress fixed 2015-12-15 14:29:07 +08:00
astaxie
58aa0545b6 Revert "compress method fixed" 2015-12-15 14:05:33 +08:00
JessonChan
499e2b59e4 compress method fixed
in http,the deflate is zlib compress method accoding to the sec
http://tools.ietf.org/html/rfc2616#section-3.5
The "zlib" format defined in RFC 1950 [31] in combination with
        the "deflate" compression mechanism described in RFC 1951 [29].
2015-12-15 11:34:26 +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
JessonChan
9170b91075 go style format (remove the blank after comments) 2015-11-21 08:46:19 +08:00
JessonChan
bc2195b07f code simplify 2015-11-12 16:59:07 +08:00
JessonChan
46fbeaadad refactor accept encoder ,simplify the struct 2015-11-12 12:03:53 +08:00
JessonChan
214030fad4 bytes reader replace string reader 2015-11-12 11:44:29 +08:00
JessonChan
a9881388f7 accept encoder header setting fixed 2015-11-12 10:08:57 +08:00
JessonChan
1200b7c347 method refactor 2015-11-11 18:06:18 +08:00
JessonChan
e4c6e5d2e1 change package 2015-11-11 13:47:47 +08:00
JessonChan
f457ea0fe9 refactor encoder package 2015-11-11 13:47:36 +08:00
JessonChan
8603127c81 beego package file path rewrite 2015-11-10 13:10:42 +08:00
JessonChan
83ec39d02e refactor max age cookies setting 2015-11-10 11:47:10 +08:00
JessonChan
3872c48349 accept encoding refactor and bug fixed 2015-11-10 10:55:47 +08:00
astaxie
821b2f832e fix the type assert 2015-11-09 11:03:57 +08:00
astaxie
9b725c73c3 Merge pull request #1376 from JessonChan/develop
static file code refactor and bug fixed
2015-11-08 23:21:16 +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
JessonChan
1abf85ed2a simplify the switch code 2015-09-22 15:18:24 +08:00
astaxie
172894efe8 golint session 2015-09-12 22:53:55 +08:00
astaxie
ff5b09fc19 golint context 2015-09-10 15:31:09 +08:00
astaxie
079993b9f7 fix #1245 2015-07-06 13:54:14 +08:00
Lionel Lee
676595213f fix a comment error. 2015-05-25 09:10:36 +08:00
Yongzheng Lai
a311d712a5 Update output.go 2015-05-25 09:10:35 +08:00
Yongzheng Lai
bb5351bb9f Update output.go
fix cookie not work in IE
2015-05-25 09:10:35 +08:00
Donal Byrne
34940d00c0 Remove unnecessary optional group flag '?' since has to match one of comma or end of string 2015-05-25 09:10:35 +08:00
Donal Byrne
1a6ea693b5 Added to input.go: AcceptHtml, AcceptsXml and AcceptsJson functions which check the header agains a regex for simpler mult-content-type handling. 2015-05-25 09:10:35 +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
shuo li
22671c524e Fix subdomain, add test, space and comment fix 2014-12-17 12:06:53 +08:00
Hily Jiang
db04c3cbb4 make Content-Type header more human-readable 2014-11-24 23:12:09 +08:00