opencadc / vostools

VOSpace command line and FUSE clients
https://www.canfar.net/en/docs/storage
12 stars 18 forks source link

Non-standard behavior in transfer call #187

Open zonia3000 opened 3 years ago

zonia3000 commented 3 years ago

Hi, there are some non-standard behaviors in get_node_url method, comparing it with URL Parameter Transfers behavior described in the VOSpace specification.

With parameter based negotiation, clients MUST provide exactly one PROTOCOL parameter.

However a list of protocols is used as parameter. Moreover, if self.secure_get is set to False the same protocol is set twice for a GET request, since the protocol dictionary contains the same value both for http and https keys in that case.

REQUEST=redirect: If supplied, the service SHALL respond with an HTTP redirect to an endpoint for the PROTOCOL. This parameter is only applicable when the value of the DIRECTION parameter is pullFromVoSpace.

However code expects a redirect even if it doesn't set that parameter.

the service SHALL reply with a XML representation of the transfer results in the response body. The only exception to this is when the DIRECTION is pullFromVoSpace and the REQUEST=redirect parameter is provided.

Considering this, shouldn't be more standard to use text/xml in the Accept header, rather than text/plain?

Thank you!