Fix CSW HTTP POST Resource URL with body Bug#428
Open
Maretius wants to merge 1 commit intogeopython:masterfrom
Open
Fix CSW HTTP POST Resource URL with body Bug#428Maretius wants to merge 1 commit intogeopython:masterfrom
Maretius wants to merge 1 commit intogeopython:masterfrom
Conversation
…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.
justb4
requested changes
Jun 1, 2022
Member
justb4
left a comment
There was a problem hiding this comment.
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:
headersis a Pythondictcontent-typeandContent-Typewill be different keys- so the
update()may not have the desired effect
Wild guess but hopefully that is the source of the problem!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.