git ssb

0+

cel / dillo-dat



Commit 0dc90679c2621a5b112229ca9441babff47814c9

URl decode paths

cel committed on 5/6/2018, 4:28:20 PM
Parent: 251cad6b3e0549f13c40d70578843e19c481fadf

Files changed

dat.dpichanged
dat.dpiView
@@ -359,9 +359,12 @@
359359
360360 DpiReq.prototype.serve = function () {
361361 var self = this
362362 if (self.closed) return
363- self.stat(self.urlp.pathname || '/', function (err, st) {
363 + var pathname = self.urlp.pathname || '/'
364 + try { pathname = decodeURIComponent(pathname) }
365 + catch(e) {}
366 + self.stat(pathname, function (err, st) {
364367 if (err) return self.serveNotFound(err)
365368 self.pathname = st.pathname
366369 if (self.urlp.query.stat) return self.serveStat(st)
367370 if (st.isDirectory()) return self.serveDirectory()

Built with git-ssb-web