Bug in file server: invalid trailing in directories on Windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rocket Web Server |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
I am using Rocket 1.1.1 (Rocket-
Rocket's embedded fileserver (method='fs') adds invalid trailing to files inside subdirectories on Windows.
How to duplicate (either cPython or Jython):
- Run examples\fs.py within a folder that has a subdirectory ('data') and files in it ('data\data1.html')
- Open subdirectory in browser ('http://
- Instead of URL-style slash ('/'), file URLs are errorneously escaped with Windows-style slash ('\').
- For instance: 'http://
This behaviour becomes a problem when HTML files have relative references to files within same directory (for instance data1.css) since Windows-style backslashes are often not interpreted as trailing slashes (browser tries to retrieve 'http://
description: | updated |
description: | updated |
description: | updated |
I can confirm now that similar bug exists for directories inside directories
Please find attached a diff to patch this bug (for methods/fs.py).