Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
import six

from .utilities import is_text_payload, is_json_payload

Expand Down Expand Up @@ -177,7 +178,7 @@ def process_request(self, request):
request.uri = request.uri.replace(old, new)

if is_text_payload(request) and request.body:
body = str(request.body)
body = six.ensure_str(request.body)
if old in body:
request.body = body.replace(old, new)

Expand Down