Commit 399e302 1 parent 0552489 commit 399e302 Copy full SHA for 399e302
File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 8
8
"ignored_assets" key in theme meta files (Issue #3210)
9
9
* Fix error when ``nikola new_post `` receives directory name as
10
10
path (Issue #3207)
11
+ * Add slashes to paths with query strings in ``nikola serve ``
12
+ only if there isn’t one before ``? ``
11
13
* Read listings files as UTF-8
12
14
* Set one-file status basing on default language only (Issue #3191)
13
15
* Don’t warn if post status is set to ``published `` explicitly
Original file line number Diff line number Diff line change @@ -215,11 +215,11 @@ def send_head(self):
215
215
path = self .translate_path (self .path )
216
216
f = None
217
217
if os .path .isdir (path ):
218
- if not self .path .endswith ('/' ):
218
+ path_parts = list (self .path .partition ('?' ))
219
+ if not path_parts [0 ].endswith ('/' ):
219
220
# redirect browser - doing basically what apache does
220
- self .send_response (301 )
221
- path_parts = list (self .path .partition ('?' ))
222
221
path_parts [0 ] += '/'
222
+ self .send_response (301 )
223
223
self .send_header ("Location" , '' .join (path_parts ))
224
224
# begin no-cache patch
225
225
# For redirects. With redirects, caching is even worse and can
You can’t perform that action at this time.
0 commit comments