Skip to content

Commit 96f47a9

Browse files
authored
[Storage][Fix]Copy source is redirecting (Azure#18577)
It seems previously the website wasn't redirecting from http to https. Service doesn't support redirecting.
1 parent 1878b74 commit 96f47a9

File tree

4 files changed

+206
-198
lines changed

4 files changed

+206
-198
lines changed

sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_abort_copy_blob.yaml

Lines changed: 110 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,103 @@ interactions:
33
body: null
44
headers:
55
Accept:
6-
- '*/*'
6+
- application/xml
77
Accept-Encoding:
88
- gzip, deflate
99
Connection:
1010
- keep-alive
1111
Content-Length:
1212
- '0'
1313
User-Agent:
14-
- azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
14+
- azsdk-python-storage-blob/12.8.1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
1515
x-ms-date:
16-
- Fri, 25 Oct 2019 18:09:15 GMT
16+
- Fri, 07 May 2021 17:24:58 GMT
1717
x-ms-version:
18-
- '2019-02-02'
18+
- '2020-06-12'
1919
method: PUT
20-
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24?timeout=5&restype=container
20+
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24?restype=container&timeout=5
2121
response:
2222
body:
23-
string: ''
23+
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>ContainerAlreadyExists</Code><Message>The
24+
specified container already exists.\nRequestId:098d9483-201e-0042-6765-43ea74000000\nTime:2021-05-07T17:24:59.0332365Z</Message></Error>"
2425
headers:
2526
content-length:
27+
- '230'
28+
content-type:
29+
- application/xml
30+
date:
31+
- Fri, 07 May 2021 17:24:58 GMT
32+
server:
33+
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
34+
x-ms-error-code:
35+
- ContainerAlreadyExists
36+
x-ms-version:
37+
- '2020-06-12'
38+
status:
39+
code: 409
40+
message: The specified container already exists.
41+
- request:
42+
body: null
43+
headers:
44+
Accept:
45+
- application/xml
46+
Accept-Encoding:
47+
- gzip, deflate
48+
Connection:
49+
- keep-alive
50+
Content-Length:
2651
- '0'
52+
User-Agent:
53+
- azsdk-python-storage-blob/12.8.1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
54+
x-ms-copy-source:
55+
- https://www.gutenberg.org/files/59466/59466-0.txt
56+
x-ms-date:
57+
- Fri, 07 May 2021 17:24:59 GMT
58+
x-ms-version:
59+
- '2020-06-12'
60+
method: PUT
61+
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24/59466-0.txt
62+
response:
63+
body:
64+
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>OperationTimedOut</Code><Message>Operation
65+
could not be completed within the specified time.\nRequestId:098d94c3-201e-0042-1b65-43ea74000000\nTime:2021-05-07T17:25:29.0954770Z</Message></Error>"
66+
headers:
67+
connection:
68+
- close
69+
content-length:
70+
- '245'
71+
content-type:
72+
- application/xml
2773
date:
28-
- Fri, 25 Oct 2019 18:09:15 GMT
29-
etag:
30-
- '"0x8D7597672739994"'
31-
last-modified:
32-
- Fri, 25 Oct 2019 18:09:15 GMT
74+
- Fri, 07 May 2021 17:25:28 GMT
3375
server:
3476
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
77+
x-ms-error-code:
78+
- OperationTimedOut
3579
x-ms-version:
36-
- '2019-02-02'
80+
- '2020-06-12'
3781
status:
38-
code: 201
39-
message: Created
82+
code: 500
83+
message: Operation could not be completed within the specified time.
4084
- request:
4185
body: null
4286
headers:
4387
Accept:
44-
- '*/*'
88+
- application/xml
4589
Accept-Encoding:
4690
- gzip, deflate
4791
Connection:
4892
- keep-alive
4993
Content-Length:
5094
- '0'
5195
User-Agent:
52-
- azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
96+
- azsdk-python-storage-blob/12.8.1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
5397
x-ms-copy-source:
54-
- http://www.gutenberg.org/files/59466/59466-0.txt
98+
- https://www.gutenberg.org/files/59466/59466-0.txt
5599
x-ms-date:
56-
- Fri, 25 Oct 2019 18:09:16 GMT
100+
- Fri, 07 May 2021 17:25:45 GMT
57101
x-ms-version:
58-
- '2019-02-02'
102+
- '2020-06-12'
59103
method: PUT
60104
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24/59466-0.txt
61105
response:
@@ -65,73 +109,73 @@ interactions:
65109
content-length:
66110
- '0'
67111
date:
68-
- Fri, 25 Oct 2019 18:09:15 GMT
112+
- Fri, 07 May 2021 17:25:53 GMT
69113
etag:
70-
- '"0x8D7597672BABFC7"'
114+
- '"0x8D9117D2A923BB3"'
71115
last-modified:
72-
- Fri, 25 Oct 2019 18:09:16 GMT
116+
- Fri, 07 May 2021 17:25:53 GMT
73117
server:
74118
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
75119
x-ms-copy-id:
76-
- c1d192f4-9fc2-437b-a08f-3e3d0800a6e8
120+
- d912a019-0bad-431d-8295-2db29beabc08
77121
x-ms-copy-status:
78122
- pending
79123
x-ms-version:
80-
- '2019-02-02'
124+
- '2020-06-12'
81125
status:
82126
code: 202
83127
message: Accepted
84128
- request:
85129
body: null
86130
headers:
87131
Accept:
88-
- '*/*'
132+
- application/xml
89133
Accept-Encoding:
90134
- gzip, deflate
91135
Connection:
92136
- keep-alive
93137
Content-Length:
94138
- '0'
95139
User-Agent:
96-
- azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
140+
- azsdk-python-storage-blob/12.8.1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
97141
x-ms-copy-action:
98142
- abort
99143
x-ms-date:
100-
- Fri, 25 Oct 2019 18:09:16 GMT
144+
- Fri, 07 May 2021 17:25:53 GMT
101145
x-ms-version:
102-
- '2019-02-02'
146+
- '2020-06-12'
103147
method: PUT
104-
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24/59466-0.txt?copyid=c1d192f4-9fc2-437b-a08f-3e3d0800a6e8&comp=copy
148+
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24/59466-0.txt?comp=copy&copyid=d912a019-0bad-431d-8295-2db29beabc08
105149
response:
106150
body:
107151
string: ''
108152
headers:
109153
content-length:
110154
- '0'
111155
date:
112-
- Fri, 25 Oct 2019 18:09:16 GMT
156+
- Fri, 07 May 2021 17:25:53 GMT
113157
server:
114158
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
115159
x-ms-version:
116-
- '2019-02-02'
160+
- '2020-06-12'
117161
status:
118162
code: 204
119163
message: No Content
120164
- request:
121165
body: null
122166
headers:
123167
Accept:
124-
- '*/*'
168+
- application/xml
125169
Accept-Encoding:
126170
- gzip, deflate
127171
Connection:
128172
- keep-alive
129173
User-Agent:
130-
- azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
174+
- azsdk-python-storage-blob/12.8.1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
131175
x-ms-date:
132-
- Fri, 25 Oct 2019 18:09:16 GMT
176+
- Fri, 07 May 2021 17:25:53 GMT
133177
x-ms-version:
134-
- '2019-02-02'
178+
- '2020-06-12'
135179
method: HEAD
136180
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24/59466-0.txt
137181
response:
@@ -145,39 +189,41 @@ interactions:
145189
content-type:
146190
- text/plain
147191
date:
148-
- Fri, 25 Oct 2019 18:09:16 GMT
192+
- Fri, 07 May 2021 17:25:53 GMT
149193
etag:
150-
- '"0x8D7597672C6CFE7"'
194+
- '"0x8D9117D2ACFC50A"'
151195
last-modified:
152-
- Fri, 25 Oct 2019 18:09:16 GMT
196+
- Fri, 07 May 2021 17:25:53 GMT
153197
server:
154198
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
199+
vary:
200+
- Origin
155201
x-ms-access-tier:
156202
- Hot
157203
x-ms-access-tier-inferred:
158204
- 'true'
159205
x-ms-blob-type:
160206
- BlockBlob
161207
x-ms-copy-completion-time:
162-
- Fri, 25 Oct 2019 18:09:16 GMT
208+
- Fri, 07 May 2021 17:25:53 GMT
163209
x-ms-copy-id:
164-
- c1d192f4-9fc2-437b-a08f-3e3d0800a6e8
210+
- d912a019-0bad-431d-8295-2db29beabc08
165211
x-ms-copy-progress:
166212
- 0/439274
167213
x-ms-copy-source:
168-
- http://www.gutenberg.org/files/59466/59466-0.txt
214+
- https://www.gutenberg.org/files/59466/59466-0.txt
169215
x-ms-copy-status:
170216
- aborted
171217
x-ms-creation-time:
172-
- Fri, 25 Oct 2019 18:09:16 GMT
218+
- Fri, 07 May 2021 17:25:53 GMT
173219
x-ms-lease-state:
174220
- available
175221
x-ms-lease-status:
176222
- unlocked
177223
x-ms-server-encrypted:
178224
- 'true'
179225
x-ms-version:
180-
- '2019-02-02'
226+
- '2020-06-12'
181227
status:
182228
code: 200
183229
message: OK
@@ -191,19 +237,19 @@ interactions:
191237
Connection:
192238
- keep-alive
193239
User-Agent:
194-
- azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
240+
- azsdk-python-storage-blob/12.8.1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
195241
x-ms-date:
196-
- Fri, 25 Oct 2019 18:09:16 GMT
242+
- Fri, 07 May 2021 17:25:53 GMT
197243
x-ms-range:
198244
- bytes=0-33554431
199245
x-ms-version:
200-
- '2019-02-02'
246+
- '2020-06-12'
201247
method: GET
202248
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24/59466-0.txt
203249
response:
204250
body:
205251
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidRange</Code><Message>The
206-
range specified is invalid for the current size of the resource.\nRequestId:cc210932-f01e-005f-6a5f-8b0351000000\nTime:2019-10-25T18:09:16.3940806Z</Message></Error>"
252+
range specified is invalid for the current size of the resource.\nRequestId:689b1184-801e-00bf-7466-436451000000\nTime:2021-05-07T17:25:53.8087976Z</Message></Error>"
207253
headers:
208254
content-length:
209255
- '249'
@@ -212,13 +258,15 @@ interactions:
212258
content-type:
213259
- application/xml
214260
date:
215-
- Fri, 25 Oct 2019 18:09:16 GMT
261+
- Fri, 07 May 2021 17:25:53 GMT
216262
server:
217263
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
264+
vary:
265+
- Origin
218266
x-ms-error-code:
219267
- InvalidRange
220268
x-ms-version:
221-
- '2019-02-02'
269+
- '2020-06-12'
222270
status:
223271
code: 416
224272
message: The range specified is invalid for the current size of the resource.
@@ -232,11 +280,11 @@ interactions:
232280
Connection:
233281
- keep-alive
234282
User-Agent:
235-
- azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
283+
- azsdk-python-storage-blob/12.8.1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
236284
x-ms-date:
237-
- Fri, 25 Oct 2019 18:09:16 GMT
285+
- Fri, 07 May 2021 17:25:53 GMT
238286
x-ms-version:
239-
- '2019-02-02'
287+
- '2020-06-12'
240288
method: GET
241289
uri: https://storagename.blob.core.windows.net/utcontainer207e0f24/59466-0.txt
242290
response:
@@ -250,35 +298,37 @@ interactions:
250298
content-type:
251299
- text/plain
252300
date:
253-
- Fri, 25 Oct 2019 18:09:16 GMT
301+
- Fri, 07 May 2021 17:25:53 GMT
254302
etag:
255-
- '"0x8D7597672C6CFE7"'
303+
- '"0x8D9117D2ACFC50A"'
256304
last-modified:
257-
- Fri, 25 Oct 2019 18:09:16 GMT
305+
- Fri, 07 May 2021 17:25:53 GMT
258306
server:
259307
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
308+
vary:
309+
- Origin
260310
x-ms-blob-type:
261311
- BlockBlob
262312
x-ms-copy-completion-time:
263-
- Fri, 25 Oct 2019 18:09:16 GMT
313+
- Fri, 07 May 2021 17:25:53 GMT
264314
x-ms-copy-id:
265-
- c1d192f4-9fc2-437b-a08f-3e3d0800a6e8
315+
- d912a019-0bad-431d-8295-2db29beabc08
266316
x-ms-copy-progress:
267317
- 0/439274
268318
x-ms-copy-source:
269-
- http://www.gutenberg.org/files/59466/59466-0.txt
319+
- https://www.gutenberg.org/files/59466/59466-0.txt
270320
x-ms-copy-status:
271321
- aborted
272322
x-ms-creation-time:
273-
- Fri, 25 Oct 2019 18:09:16 GMT
323+
- Fri, 07 May 2021 17:25:53 GMT
274324
x-ms-lease-state:
275325
- available
276326
x-ms-lease-status:
277327
- unlocked
278328
x-ms-server-encrypted:
279329
- 'true'
280330
x-ms-version:
281-
- '2019-02-02'
331+
- '2020-06-12'
282332
status:
283333
code: 200
284334
message: OK

0 commit comments

Comments
 (0)