File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -419,7 +419,7 @@ function redirectToS3(r) {
419
419
if ( isDirectoryListing && r . method === 'GET' ) {
420
420
r . internalRedirect ( "@s3Listing" ) ;
421
421
} else if ( provide_index_page == true ) {
422
- r . internalRedirect ( "@s3" ) ;
422
+ r . internalRedirect ( "@s3" ) ;
423
423
} else if ( ! allow_listing && ! provide_index_page && uriPath == "/" ) {
424
424
r . internalRedirect ( "@error404" ) ;
425
425
} else {
@@ -790,21 +790,9 @@ function _padWithLeadingZeros(num, size) {
790
790
* @private
791
791
*/
792
792
function _encodeURIComponent ( string ) {
793
- var additionalEscapes = [
794
- [ / \( / g, '%28' ] ,
795
- [ / \) / g, '%29' ] ,
796
- [ / \! / g, '%21' ] ,
797
- [ / \* / g, '%2A' ] ,
798
- [ / \' / g, '%27' ]
799
- ] ;
800
-
801
- var encoded = encodeURIComponent ( string ) ;
802
-
803
- additionalEscapes . forEach ( function ( replace ) {
804
- encoded = encoded . replace ( replace [ 0 ] , replace [ 1 ] ) ;
805
- } ) ;
806
-
807
- return encoded ;
793
+ return encodeURIComponent ( string )
794
+ . replace ( / [ ! * ' ( ) ] / g, ( c ) =>
795
+ `%${ c . charCodeAt ( 0 ) . toString ( 16 ) . toUpperCase ( ) } ` ) ;
808
796
}
809
797
810
798
/**
You can’t perform that action at this time.
0 commit comments