Open lmika-bom opened 7 years ago
The hint for bug 1 is "Transport.java" line 244. The call to config.setHost()
hard-codes the scheme to "http" instead of pick up the scheme from the URL. The fix for bug 2 regarding redirects could probably be fixed by looking at the Javadoc of Apache commons HttpClient version 3.0.1 (which differs from the latest version).
After investigating bug 2 a little more, not following redirects for POST messages is actually a design decision by the HTTP client used (RFC 2616 is referenced). Therefore, POST redirects may need to be handled manually (or not at all).
Or maybe the OAI-PMH requests should use GET instead of POST. Though the OAI-PMH Spec does not dictate the HTTP method, it feels more appropriate to use GET.
The Transport
class does support either GET or POST, with POST being the default. There is also a public method to change the HTTP method, but it doesn't look to be used. I can change the default to GET and see if this would cause any problems.
Initial PR containing fixes for 1 and 3. Will wait for a discussion of the use of GET and POST before fixing 2.
Point 2 is the only thing keeping this issue open. If we don't want to do this, this issue can be closed.
@tg4444 . A query from the PMC meeting in Helsinkini - Has this been resolved in v3.14?
I'm not aware that 'Point 2' has been addressed.
@jude2018, No relevant pull requests have been merged since the time @lmika-bom's fix was merged. As a result, 'Point 2' has not been addressed.
There are various bugs in the OAI-PMH harvesting client in OpenWIS 3.x which makes it impossible to harvest metadata from a HTTPS endpoint. This came to light with the switch-over to HTTPS only harvesting from GISC Exeter.
The bugs are located in the "oaipmh" project: