Project

General

Profile

Actions

Bug #22295

open

rgw multisite can't sync obj that has a name with url special character like '/'

Added by mingshuai wang over 6 years ago. Updated over 6 years ago.

Status:
Triaged
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

obj can sync:
normalobj

obj can't sync:
test/test/test
test/test/test/s

is this a bug?

Actions #1

Updated by Chang Liu over 6 years ago

Hey, what's you ceph version? and would you mind checking the logging of RGW?

Actions #2

Updated by Chang Liu over 6 years ago

  • Assignee set to Chang Liu
Actions #3

Updated by mingshuai wang over 6 years ago

Chang Liu wrote:

Hey, what's you ceph version? and would you mind checking the logging of RGW?

ceph version 10.2.9

int RGWRESTStreamRWRequest::get_obj(RGWAccessKey& key, map<string, string>& extra_headers, rgw_obj& obj)
{
  string urlsafe_bucket, urlsafe_object;
  url_encode(obj.bucket.get_key(':', 0), urlsafe_bucket);
  url_encode(obj.get_orig_obj(), urlsafe_object);
  string resource = urlsafe_bucket + "/" + urlsafe_object;

  return get_resource(key, extra_headers, resource);
}

when get_obj from source zone, rgw will url_encode obj_name, then "/" will be encoded, source zone will return error -2

Actions #4

Updated by mingshuai wang over 6 years ago

when rgw use civetweb as web frontend,it can deal with obj that has a name with url special character like '/'
however, when rgw use apache as web frontend , it can not deal with obj that has a name with url special character like '/', so, when using apache as web frontend, how to config to solve this problem?

Actions #5

Updated by mingshuai wang over 6 years ago

mingshuai wang wrote:

when rgw use civetweb as web frontend,it can deal with obj that has a name with url special character like '/'
however, when rgw use apache as web frontend , it can not deal with obj that has a name with url special character like '/', so, when using apache as web frontend, how to config to solve this problem?

eg url: http://127.0.0.1:8088/sync_test/xxxxxxx%2fxxxxxx

Actions #6

Updated by mingshuai wang over 6 years ago

apache doesn't allow URLs which contain encoded path separators (%2F for / and additionally %5C for \ on accordant systems) to be used in the path info.

when rgw using apache as web frontend,apache will just return 404, when got request url which contain encoded path separators (%2F for / and additionally %5C for \ on accordant systems) to be used in the path info.

For apache 2.4, add "AllowEncodedSlashes On" to /etc/httpd/conf/extra/rgw.conf to solve this problem.

Actions #7

Updated by Matt Benjamin over 6 years ago

  • Status changed from New to Triaged
Actions

Also available in: Atom PDF