@@ -224,14 +224,14 @@ describe('ResourceMapper', () => {
224224 contentType : 'text/html'
225225 } )
226226
227- itMapsUrl ( mapper , 'a URL of a new file with encoded characters' ,
227+ itMapsUrl ( mapper , 'a URL of a new file with encoded characters and encoded / ' ,
228228 {
229- url : 'http://localhost/space %2Ffoo%20bar%20bar.html' ,
229+ url : 'http://localhost/%25252fspace %2Ffoo%20bar%20bar.html' ,
230230 contentType : 'text/html' ,
231231 createIfNotExists : true
232232 } ,
233- { // alain
234- path : `${ rootPath } space %2Ffoo bar bar.html` ,
233+ {
234+ path : `${ rootPath } %25252fspace %2Ffoo bar bar.html` ,
235235 contentType : 'text/html'
236236 } )
237237
@@ -333,15 +333,6 @@ describe('ResourceMapper', () => {
333333 contentType : 'application/octet-stream'
334334 } )
335335
336- itMapsUrl ( mapper , 'a URL ending with an encoded slash to a folder when no index is available' ,
337- {
338- url : 'http://localhost/space/'
339- } ,
340- {
341- path : `${ rootPath } space/` ,
342- contentType : 'application/octet-stream'
343- } )
344-
345336 itMapsUrl ( mapper , 'a URL of that has an accompanying acl file, but no actual file' ,
346337 {
347338 url : 'http://localhost/space/'
@@ -418,14 +409,6 @@ describe('ResourceMapper', () => {
418409 } ,
419410 new Error ( 'Disallowed /.. segment in URL' ) )
420411
421- /* itMapsUrl(mapper, 'a URL with an encoded /.. path segment',
422- {
423- url: 'http://localhost/space%2F..%2Fbar'
424- },
425- new Error('Disallowed /.. segment in URL'))
426- */
427- // File to URL mapping
428-
429412 itMapsFile ( mapper , 'an HTML file' ,
430413 { path : `${ rootPath } space/foo.html` } ,
431414 {
@@ -511,9 +494,9 @@ describe('ResourceMapper', () => {
511494 } )
512495
513496 itMapsFile ( mapper , 'a file with %encoded /' ,
514- { path : `${ rootPath } %2Fspace/foo %2f.html` } ,
497+ { path : `${ rootPath } %2Fspace/%25252Ffoo %2f.html` } ,
515498 {
516- url : 'http://localhost/%2Fspace/foo %2f.html' ,
499+ url : 'http://localhost/%2Fspace/%25252Ffoo %2f.html' ,
517500 contentType : 'text/html'
518501 } )
519502
0 commit comments