opendatatrentino / jackan

Java client to access CKAN repositories
http://opendatatrentino.github.io/jackan
Other
19 stars 13 forks source link

CkanClient.makeResourceUrl(..) returns a broken URL, is due to a server misconfiguration or a bug?? #24

Closed francescomangiacrapa closed 8 years ago

francescomangiacrapa commented 8 years ago

Hi, I'm "novice" about Jackan/Ckan technologies. During these days I created several JUnit Test to better understand how to use Jackan with Ckan. I'm using Jackan 0.4.2 with Ckan (2.5.1) and seems that the method CkanClient.makeResourceUrl(CKAN_CLIENT.getCatalogUrl(), resourceCreated.getPackageId(), resourceCreated.getId())) returns a broken URL.

In particular the URL returned does not contain '/dataset/' in the path. The method returns: http://[hostname]/[datasetID or datasetName]/resource/[resourceID] but is broken adding the string "/dataset/" in the path after [hostname]: http://[hostname]/dataset/[datasetID or datasetName]/resource/[resourceID] is right

Is it a bug or a misconfiguration on CKAN server? Thx a lot.

DavidLeoni commented 8 years ago

Ciao Francesco,

you're right, it's a bug! Thanks for reporting.

I pushed a fix to the stable branch-0.4 , if you want to try that out.

I also updated the wiki about contributing , in case you notice some other bug and wish to provide unit tests.

Cheers, David