]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: convert + to space in url_decode
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 2 Apr 2010 20:14:12 +0000 (13:14 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 2 Apr 2010 23:51:19 +0000 (16:51 -0700)
src/rgw/rgw_common.cc

index 6330fe215440e439fb172587eb1b60d0e182233b..da9debcea178ff9114f4838fc82ce5cb1961f2eb 100644 (file)
@@ -122,7 +122,12 @@ bool url_decode(string& src_str, string& dest_str)
 
   while (*src) {
     if (*src != '%') {
-      dest[pos++] = *src++;
+      if (*src != '+') {
+       dest[pos++] = *src++;
+      } else {
+       dest[pos++] = ' ';
+       ++src;
+      }
     } else {
       src++;
       char c1 = hex_to_num(*src++);