usnistgov / oar-pdr

The NIST Open Access to Research (OAR) Public Data Repository (PDR) system software
11 stars 10 forks source link

Preservation Service: add support for X-HTTP-Method-Override for MIDAS #56

Closed RayPlante closed 6 years ago

RayPlante commented 6 years ago

This PR addresses a special issue with the MIDAS interface (and addresses a request from Chris). MIDAS, as a Java application on the backend, uses the default Java 8 URL classes to connect to a service; these default classes do not, as is, support the lesser-used (though standard) HTTP methods like PATCH. The simplest work-around is to use the X-HTTP-Method-Override header variable; however, this variable must be explicitly supported on the server. This PR adds that support which allows a POST support to be converted to a PATCH.

RayPlante commented 6 years ago

Self review: I tested this hot fix under oar-docker (see oar-docker PR#104).