Skip to content

Commit c322f35

Browse files
committed
wip in fix sometimes-broken onedrive api calls
1 parent 1e7df8a commit c322f35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

waterbutler/providers/onedrive/provider.py

+2
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ async def download(self, # type: ignore
310310
'GET',
311311
download_url,
312312
range=range,
313+
no_auth_header=True, # if download_url is signed, OD will sometimes 401 if auth header is included
313314
expects=(HTTPStatus.OK, HTTPStatus.PARTIAL_CONTENT),
314315
headers={'accept-encoding': ''},
315316
throws=exceptions.DownloadError,
@@ -766,6 +767,7 @@ async def _chunked_upload_stream_by_range(self, upload_url, data, start_range=0,
766767
start_range + len(data) - 1,
767768
total_size)
768769
},
770+
no_auth_header=True, # this endpoint will sometimes 401 if the Auth header included
769771
expects=(HTTPStatus.ACCEPTED, HTTPStatus.CREATED),
770772
throws=exceptions.UploadError
771773
)

0 commit comments

Comments
 (0)