-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] BlobSasBuilder.ToString() doesn't apply URL encoding to ContentDisposition value. #9265
Comments
/cc @alzimmermsft @rakshith91 @jeremymeng |
@seanmcc-msft , merged code uses System.Net.WebUtility.UrlEncode hence all spaces in ContentDisposition will be replaced by "+" sign. Probably we need to apply System.Web.HttpUtility.UrlPathEncode method and replace all spaces by "%20" instead of "+". The contend-disposition encoding was discussed here: https://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http Does it make sense? |
I think + instead of %20 is fine, because the SAS is in the query of the URL. Also, in the unit test I added, the service is returning the non-url-encoded ContentDisposition header for blob.GetPropertiesAsync(). |
JS doesn't have this problem |
The guidance from dotnet/runtime#45328 (comment) suggests not using We recently upgraded from the now deprecated version of the storage SDK to this version and have hit an issue with spaces being encoded as Would you consider an option that allowed us to opt into using |
Description
BlobSasBuilder.ToString() doesn't apply URL encoding to ContentDisposition value.
Context Details
Code Snippet
The following unit test completely describes this bug:
Expected behavior
BlobSasBuilder.ToString() method should return string where ContentDisposition is URL encoded string as other parts of the result string.
The text was updated successfully, but these errors were encountered: