diff options
author | Gabriel Silva Simões <simoes.sgabriel@gmail.com> | 2019-02-05 20:58:55 -0500 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-02-05 20:58:55 -0500 |
commit | 3b7f41f9f7bbd3d19ce5a6b667b5c1f56c2b1b51 (patch) | |
tree | 02faf1bad6fce7f2b4357e7a4c705c6f8069fd23 /routers/api/v1/misc | |
parent | 4a747aef7b24970a199f246c22974f7e1ba31382 (diff) | |
download | gitea-3b7f41f9f7bbd3d19ce5a6b667b5c1f56c2b1b51.tar.gz gitea-3b7f41f9f7bbd3d19ce5a6b667b5c1f56c2b1b51.zip |
Fix serving of raw wiki files other than .md (#5814)
* Fix serving of raw wiki files other than .md
Closes #4690.
Closes #4395.
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Simplify code at routers/repo/wiki.go
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Add more files to user2/repo1.wiki for testing
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Update macaron to v1.3.2
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Add tests for WikiRaw
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Fix NewResponseWriter usage due to macaron update
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Add raw to reserved wiki names
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
Diffstat (limited to 'routers/api/v1/misc')
-rw-r--r-- | routers/api/v1/misc/markdown_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/misc/markdown_test.go b/routers/api/v1/misc/markdown_test.go index f9503bc639..32d2f0730e 100644 --- a/routers/api/v1/misc/markdown_test.go +++ b/routers/api/v1/misc/markdown_test.go @@ -27,7 +27,7 @@ func createContext(req *http.Request) (*macaron.Context, *httptest.ResponseRecor c := &macaron.Context{ Injector: inject.New(), Req: macaron.Request{Request: req}, - Resp: macaron.NewResponseWriter(resp), + Resp: macaron.NewResponseWriter(req.Method, resp), Render: &macaron.DummyRender{ResponseWriter: resp}, Data: make(map[string]interface{}), } |