index & s3: handle some url encoding mess
This commit is contained in:
parent
0f664d3890
commit
24b07f3d95
|
@ -77,7 +77,8 @@ class AwsAuth
|
|||
@headerMap['x-amz-content-sha256']
|
||||
|
||||
canonicalURI: ->
|
||||
encodeURI @url.pathname
|
||||
# new URL already handles URI encoding for the pathname. No need to repeat here.
|
||||
@url.pathname
|
||||
|
||||
canonicalQueryString: ->
|
||||
return "" if not @qsMap
|
||||
|
|
|
@ -113,7 +113,7 @@ handleGET = (req, file) ->
|
|||
# Add content-disposition header to indicate file name
|
||||
inline = util.shouldShowInline headers['content-type']
|
||||
headers['content-disposition'] =
|
||||
(if inline then 'inline;' else 'attachment;') + ' filename=' + fileName
|
||||
(if inline then 'inline;' else 'attachment;') + ' filename*=' + encodeURIComponent fileName
|
||||
|
||||
# Handle ranged resposes
|
||||
if resp.headers.has 'content-range'
|
||||
|
|
Loading…
Reference in a new issue