Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Update REQUEST-920-PROTOCOL-ENFORCEMENT.conf #1690

Open
wants to merge 1 commit into
base: v3.3/dev
Choose a base branch
from
Open

Update REQUEST-920-PROTOCOL-ENFORCEMENT.conf #1690

wants to merge 1 commit into from

Conversation

azurit
Copy link
Contributor

@azurit azurit commented Feb 14, 2020

According to SOAP 1.2 specification, the optional 'action' parameter is allowed for 'Content-Type' header, see RFC3902:
https://www.ietf.org/rfc/rfc3902.txt

Also, the original regexp was invalid as it was allowing only one parameter to 'Content-Type' header (there were two possible parameters which can be set at once: charset and boundary [now they are three]).

Finally, i added a hashtag character into allowed ones, real-world example:
Content-Type: application/soap+xml; charset=utf-8; action="urn:localhost-hwh#getQuestions"

@dune73
Copy link
Contributor

dune73 commented Feb 14, 2020

Travis passing now. Thank you.

@dune73
Copy link
Contributor

dune73 commented Feb 14, 2020

Here is a more elaborate explanation (taken from #1688 (comment)):

According to RFCs, all of these 'Content-Type' headers are valid:

Content-Type: application/soap+xml
Content-Type: application/soap+xml; charset=utf-8
Content-Type: application/soap+xml; charset=utf-8; action="urn:localhost-hwh#getQuestions"
Content-Type: application/soap+xml; action="urn:localhost-hwh#getQuestions"
Content-Type: application/soap+xml; charset=utf-8; boundary="something"
Content-Type: application/soap+xml; boundary="something"

Your original regexp was able to match only these:

Content-Type: application/soap+xml
Content-Type: application/soap+xml; charset=utf-8
Content-Type: application/soap+xml; boundary="something"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants