File tree 2 files changed +19
-5
lines changed
oioswift/common/middleware
2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 25
25
from hashlib import md5
26
26
import mimetypes
27
27
import six
28
+ from six .moves .urllib .parse import urlencode
28
29
import time
29
30
30
31
from oio .common .json import json
@@ -447,11 +448,14 @@ def resp_iter(total_size=total_size):
447
448
last_yield_time = time .time ()
448
449
449
450
# BEGIN: New OpenIO code
451
+ params = {
452
+ 'format' : 'json' ,
453
+ 'prefix' : seg_prefix ,
454
+ 'limit' : self .max_manifest_segments
455
+ }
450
456
sub_req = make_subrequest (
451
457
req .environ ,
452
- path = '%s?format=json&prefix=%s&limit=%d' %
453
- (segments_container_path , seg_prefix ,
454
- self .max_manifest_segments ),
458
+ path = '%s?%s' % (segments_container_path , urlencode (params )),
455
459
method = 'GET' ,
456
460
headers = {'x-auth-token' : req .headers .get ('x-auth-token' )},
457
461
agent = '%(orig)s SLO MultipartPUT' , swift_source = 'SLO' )
Original file line number Diff line number Diff line change 8
8
import json
9
9
import os
10
10
11
- ENDPOINT = os .getenv ("USE_ENDPOINT" , "http://127.0.0.1 :5000" )
11
+ ENDPOINT = os .getenv ("USE_ENDPOINT" , "http://localhost :5000" )
12
12
AWS = ["aws" , "--endpoint" , ENDPOINT ]
13
13
14
14
random_chars = string .lowercase + string .digits
@@ -142,9 +142,19 @@ def run_test(bucket, path):
142
142
143
143
def main ():
144
144
run_test (random_str (10 ),
145
- "docker/registry/v2/repositories/hello/_uploads/333633b0-503f-4b2a-9b43-e56ec6445ef3/data" ) # noqa
145
+ "docker/registry/v2/repositories/hello/_uploads/"
146
+ "333633b0-503f-4b2a-9b43-e56ec6445ef3/data" )
147
+ run_test (random_str (10 ),
148
+ "docker/registry/v2/repositories/hello+world/_uploads/"
149
+ "333633b0-503f-4b2a-9b43-e56ec6445ef3/data" )
150
+ run_test (random_str (10 ),
151
+ "docker/registry/v2/repositories/hello/_uploads/"
152
+ "333633b0-503f-4b2a-9b43-e56ec6445ef3/data+" )
146
153
run_test (random_str (10 ),
147
154
"CBB_DESKTOP-1LC5CCV/C:/Bombay/Logs/titi:/12121212/titi" )
155
+ run_test (random_str (10 ),
156
+ "CBB_DESKTOP-1LC5CCV/C:/Bombay/Logs/titi+rominet:/12121212/"
157
+ "titi+rominet" )
148
158
run_test (random_str (10 ), random_str (10 ))
149
159
150
160
You can’t perform that action at this time.
0 commit comments