From f298414b948fe17e6595413f598cd10f8f05ed63 Mon Sep 17 00:00:00 2001 From: Malte Lange Date: Wed, 1 Jun 2022 10:11:15 +0200 Subject: [PATCH] The Catalogue Service (CSW) with HTTP POST Resource URL with body - Probe doesn't send a Content-Type and generated a 415 (Unsupported Media Type) Error. It was tested with tcpdump and wireshark and GeoHealthCheck version 0.8.3. After changing the return value to "{'content-type': self._parameters['content_type']}" of the get_request_headers method the problem was solved. --- GeoHealthCheck/plugins/probe/http.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GeoHealthCheck/plugins/probe/http.py b/GeoHealthCheck/plugins/probe/http.py index 0687eb0a..564ac875 100644 --- a/GeoHealthCheck/plugins/probe/http.py +++ b/GeoHealthCheck/plugins/probe/http.py @@ -88,6 +88,7 @@ def get_request_headers(self): # request_headers = # self.REQUEST_HEADERS['content-type'].format(**content_type) # Hmm seems simpler - headers = Probe.get_request_headers(self) - return headers.update( - {'Content-Type': self._parameters['content_type']}) + # headers = Probe.get_request_headers(self) + # return headers.update( + # {'Content-Type': self._parameters['content_type']}) + return {'content-type': self._parameters['content_type']}