Skip to content

Commit

Permalink
rgw: fix url escaping
Browse files Browse the repository at this point in the history
Fixes: ceph#8202
This fixes the radosgw side of issue ceph#8202. Needed to cast value
to unsigned char, otherwise it'd get padded.

Backport: dumpling

Signed-off-by: Yehuda Sadeh <[email protected]>
(cherry picked from commit bcf92c4)
  • Loading branch information
yehudasa authored and Sage Weil committed Apr 28, 2014
1 parent a60e15a commit a027100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rgw/rgw_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ bool url_decode(string& src_str, string& dest_str)
static void escape_char(char c, string& dst)
{
char buf[16];
snprintf(buf, sizeof(buf), "%%%.2X", (unsigned int)c);
snprintf(buf, sizeof(buf), "%%%.2X", (int)(unsigned char)c);
dst.append(buf);
}

Expand Down

0 comments on commit a027100

Please sign in to comment.