gmantele / vollt

Java libraries implementing the IVOA protocol: ADQL, UWS and TAP
http://cdsportal.u-strasbg.fr/taptuto/
29 stars 28 forks source link

[uws] Extra / on base tap url causes jobs to not be started #116

Open jd-au opened 5 years ago

jd-au commented 5 years ago

We use just the uws and adql libraries but not the tap library. When updating uws to v4.4 we found that if the tap url entered in TOPCAT's "Select Service" tab was http://localhost:8080/casda_vo_tools/tap then the UWS library correctly processed the jobs, but this wasn't the case if instead the url was entered as http://localhost:8080/casda_vo_tools/tap/ . In that case when UWS receives a request URL like http://localhost:8080/casda_vo_tools/tap//async

Expected:

The double slash would be treated as a single / and the request would be processed as normal.

Actual:

When a double slash is present, all requests will return the home page.

Diagnosis:

Normally when a http://localhost:8080/casda_vo_tools/tap/async request is passed to the uws library, UWSUrl.loadUwsUri will pick out the async as the job list name, however when a double slash is present, the //async is treated as having an empty path element and thus loadUwsUri would find an empty jobListName. When using the UWSService, the home page is always returned if the jobListName is empty.

I'll raise a pull request to correct this.