From 3b7f41f9f7bbd3d19ce5a6b667b5c1f56c2b1b51 Mon Sep 17 00:00:00 2001 From: Gabriel Silva Simões Date: Tue, 5 Feb 2019 20:58:55 -0500 Subject: Fix serving of raw wiki files other than .md (#5814) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix serving of raw wiki files other than .md Closes #4690. Closes #4395. Signed-off-by: Gabriel Silva Simões * Simplify code at routers/repo/wiki.go Signed-off-by: Gabriel Silva Simões * Add more files to user2/repo1.wiki for testing Signed-off-by: Gabriel Silva Simões * Update macaron to v1.3.2 Signed-off-by: Gabriel Silva Simões * Add tests for WikiRaw Signed-off-by: Gabriel Silva Simões * Fix NewResponseWriter usage due to macaron update Signed-off-by: Gabriel Silva Simões * Add raw to reserved wiki names Signed-off-by: Gabriel Silva Simões --- routers/api/v1/misc/markdown_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/api/v1') 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{}), } -- cgit v1.2.3