Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CSW HTTP POST Resource URL with body Bug #428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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