Merge pull request #154 from s3fs-fuse/issue#149

Fixed url-encoding for ampersand etc on sigv4 - Improvement/#149
This commit is contained in:
Takeshi Nakatani 2015-03-21 11:32:08 +09:00
commit 66e0233410

View File

@ -125,10 +125,6 @@ string urlEncode(const string &s)
for (unsigned i = 0; i < s.length(); ++i) {
if (s[i] == '/') { // Note- special case for fuse paths...
result += s[i];
}else if (s[i] == '=') { // Note- special case for s3...
result += s[i];
}else if (s[i] == '&') { // Note- special case for s3...
result += s[i];
} else if (isalnum(s[i])) {
result += s[i];
} else if (s[i] == '.' || s[i] == '-' || s[i] == '*' || s[i] == '_') {
@ -159,6 +155,8 @@ string urlEncode2(const string &s)
result += s[i];
}else if (s[i] == '&') { // Note- special case for s3...
result += s[i];
}else if(s[i] == '%'){
result += s[i];
} else if (isalnum(s[i])) {
result += s[i];
} else if (s[i] == '.' || s[i] == '-' || s[i] == '*' || s[i] == '_') {