UWS result URL - is relative URL okay?
Mark Taylor
M.B.Taylor at bristol.ac.uk
Mon Nov 4 10:11:07 CET 2019
Christine,
It's a good question, and though I haven't been through in detail
looking for one, I don't see a clear answer to this in the docs.
But a couple of thoughts.
- The answer to this ought to be made explicit one way or
another in a future version of the UWS specification.
- Since the examples in the UWS spec use absolute URLs it's probably
safest to use absolute URLs in implementations, assuming it's
straightforward to do so - but I can see there might be times when
a relative URL would be preferable in implementation terms.
- The fact that topcat works with a relative URL here actually proves
nothing: it ignores the uws:results element of the uws:job document,
instead relying on the requirement in the TAP (not UWS) document
(TAP 1.1 sec 2.2):
For query languages that produce a single result executed using
the /async endpoint, the result of a successful query can be found
within the result list specified by UWS; the result must be named
result and thus clients can access it directly, e.g.:
http://example.com/tap/async/42/results/result
So you can write anything there and topcat will swallow it!
Mark
P.S. Sorry for the slow response, for one reason and another I've been
out of email for a few days.
On Fri, 1 Nov 2019, Brian Major wrote:
> Hi Christine,
>
> I don't see text in the spec that would indicate that relative URLs are not
> allowed either, and they are legitimate values for 'anyURI'.
>
> https://www.w3.org/TR/xmlschema11-2/#anyURI
>
> But since they're not mentioned in UWS I'd say the regular rules
> determining the base of relative URLs should be applied (
> https://www.w3.org/TR/WD-html40-970917/htmlweb.html section 5.1.2), in
> which case they would be relative to the result-list endpoint. One would
> get the result that contains the relative URL from:
>
> /{jobs}/{job-id}/results/{myresult}
>
> Which would contain (for example) ./rel-url/to/result
>
> And resolve to
>
> /{jobs}/{job-id}/results/rel-url/to/result
>
> This seems to agree with the sentence in section 2.2.2.3 of UWS "A sensible
> default for their URIs is to make them children of
> /{jobs}/{job-id}/results, but this is not required.".
>
> Cheers,
> Brian
>
>
> On Thu, Oct 31, 2019 at 1:09 PM Christine Banek <CBanek at lsst.org> wrote:
>
> > Hi all,
> >
> >
> > I just got an interesting bug report on pyvo today and after reading the
> > UWS spec hoping for some clarity, I'm at a loss if this is allowed. Here's
> > the original issue:
> >
> >
> > https://github.com/astropy/pyvo/issues/191
> >
> >
> > Basically, the result URL field in a UWS async job is a relative URL. Is
> > this allowed / part of the spec? If relative is allowed, is that URL
> > considered relative to the UWS Job URL? Since it seems to work with
> > TOPCAT, I've added Mark as well to get his feelings.
> >
> >
> > Thanks all,
> >
> > Christine
> >
>
--
Mark Taylor Astronomical Programmer Physics, Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-9288776 http://www.star.bris.ac.uk/~mbt/
More information about the grid
mailing list