Skip to content

Conversation

@Maretius
Copy link
Contributor

@Maretius Maretius commented Jun 1, 2022

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.

…robe 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.
Copy link
Member

@justb4 justb4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @Maretius ! This function is very essential to GHC functioning. In the original case the function will first get the headers from the Probe base class, usually default standard headers and add (.update()) the Content-Type header. In your fix it looks like only the Content-Type header is set. This will work in most cases but the base class function may also add Auth-headers etc.

What I think the original problem may be is that:

  • headers is a Python dict
  • content-type and Content-Type will be different keys
  • so the update() may not have the desired effect

Wild guess but hopefully that is the source of the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants