You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've been doing some testing using tusc, which is a statically compiled binary using this library. Everything worked great with it when using tusd as the server. But then I switched to my application that is built with tuscdotnet and the PATCH call started failing with an error about a missing server.
It turns out that tuscdotnet returns a relative path for location (Location: files/24e533e02ec3bc40c387f1a0e460e216) whereas the tusd implementation returns an absolute path (Location: https://tus.example.org/files/24e533e02ec3bc40c387f1a0e460e216).
According to the spec, either is acceptable, but the absolute is always shown in examples:
The Server MUST acknowledge a successful upload creation with the 201 Created status. The Server MUST set the Location header to the URL of the created resource. This URL MAY be absolute or relative.
So it seems that the location value needs to be checked and converted to an absolute path before the PATCH call. I'd attempt a PR, but I'm not familiar with golang at all.
The text was updated successfully, but these errors were encountered:
jkoplo
changed the title
'Location' returns relative instead of absolute
'Location' expects absolute URL
Nov 12, 2020
So I've been doing some testing using tusc, which is a statically compiled binary using this library. Everything worked great with it when using
tusd
as the server. But then I switched to my application that is built with tuscdotnet and the PATCH call started failing with an error about a missing server.It turns out that
tuscdotnet
returns a relative path for location (Location: files/24e533e02ec3bc40c387f1a0e460e216
) whereas thetusd
implementation returns an absolute path (Location: https://tus.example.org/files/24e533e02ec3bc40c387f1a0e460e216
).According to the spec, either is acceptable, but the absolute is always shown in examples:
So it seems that the location value needs to be checked and converted to an absolute path before the PATCH call. I'd attempt a PR, but I'm not familiar with golang at all.
The text was updated successfully, but these errors were encountered: