Skip to content

Commit 3b7f41f

Browse files
gabrielsimoestechknowlogick
authored andcommitted
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>
1 parent 4a747ae commit 3b7f41f

17 files changed

+77
-31
lines changed

Gopkg.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
x���m� D�M��Y����(�J�`�5�ɜ-�K*Ki,Hi!?��<�i�Vki0Z��XH�D(Z6ĨG�Sb��3�JD�h��!�uB��DaJp� ���F�Lƹ4+~��v�;���
2+
e����[Nx>K�����_s�q�/�]09MHpѤ��k���_d�-%�풇۞�� v�_�]��^�/�I[t
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
x�M�@ ��M����r�›�6�&&&��9Le�św����t<#���͡�mv-��0w�b��jy̖��ڗ~݋[�����=H� �.�"������ǁ=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
x���m�0���)n���t2�S����`ņ���e�,VY�/H�#�[)��E��@N�q��툎�r2�)D��0�j�C���L��aC��&�4B�v]$E����Iӑe����P�r�I�s�e�z�˳~_
2+
���[y��v��W��V=헛�˘�H vZ~s�@݉%����?T�ZH
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2c54faec6c45d31c1abfaecdab471eac6633738a
1+
0cf15c3f66ec8384480ed9c3cf87c9e97fbb0ec3

models/wiki.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
var (
25-
reservedWikiNames = []string{"_pages", "_new", "_edit"}
25+
reservedWikiNames = []string{"_pages", "_new", "_edit", "raw"}
2626
wikiWorkingPool = sync.NewExclusivePool()
2727
)
2828

0 commit comments

Comments
 (0)