Skip to content

Commit 17c5759

Browse files
petterreinholdtsenleondutoit
authored andcommitted
Send Modified-Time header as string, not float
The requests library reject float values, causing the client to stop.
1 parent cffe92d commit 17c5759

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tsdapiclient/fileapi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def _complete_resumable(
650650
url: str,
651651
bar: Bar,
652652
session: Any = requests,
653-
mtime: Optional[int] = None,
653+
mtime: Optional[str] = None,
654654
):
655655
headers = {'Authorization': 'Bearer {0}'.format(token)}
656656
if mtime:
@@ -731,7 +731,7 @@ def start_resumable(
731731
group = '{0}-member-group'.format(pnum)
732732
parmaterised_url = '{0}?chunk={1}&id={2}&group={3}'.format(url, 'end', upload_id, group)
733733
resp = _complete_resumable(
734-
filename, token, parmaterised_url, bar, session=session, mtime=current_mtime
734+
filename, token, parmaterised_url, bar, session=session, mtime=str(current_mtime)
735735
)
736736
return resp
737737

@@ -804,7 +804,7 @@ def continue_resumable(
804804
group = '{0}-member-group'.format(pnum)
805805
parmaterised_url = '{0}?chunk={1}&id={2}&group={3}'.format(url, 'end', upload_id, group)
806806
resp = _complete_resumable(
807-
filename, token, parmaterised_url, bar, session=session, mtime=current_mtime
807+
filename, token, parmaterised_url, bar, session=session, mtime=str(current_mtime)
808808
)
809809
return resp
810810

0 commit comments

Comments
 (0)