Skip to content

Commit

Permalink
Merge branch 'main' into support/3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuch committed Nov 17, 2023
2 parents f744cd8 + d7ce042 commit d453ccf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion code/zato-common/src/zato/common/util/url_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ def get_match_target(config, sep=MISC.SEPARATOR, accept_any_http=accept_any_http
http_accept = config.get('http_accept') or accept_any_http
http_accept = http_accept.replace('*', '{}'.format(accept_any_internal)).replace('/', 'HTTP_SEP')

return '%s%s%s%s%s%s%s' % (config['soap_action'], sep, http_method, sep, http_accept, sep, config['url_path'])
# Extract variables needed to build the pattern
soap_action = config['soap_action']
url_path = config['url_path']

# Support parentheses in URL paths
url_path = url_path.replace('(', r'\(')
url_path = url_path.replace(')', r'\)')

# Build the pattern ..
pattern = f'{soap_action}{sep}{http_method}{sep}{http_accept}{sep}{url_path}'

# .. and return it to our caller
return pattern

# ################################################################################################################################
2 changes: 1 addition & 1 deletion code/zato-server/src/zato/server/ext/zunicorn/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def bytes_to_str(b):
import urllib.parse

def unquote_to_wsgi_str(string):
return _unquote_to_bytes(string).decode('latin-1')
return _unquote_to_bytes(string).decode('utf-8')

_unquote_to_bytes = urllib.parse.unquote_to_bytes

Expand Down

0 comments on commit d453ccf

Please sign in to comment.