Skip to content

Commit 8ec4496

Browse files
authored
Merge pull request #250 from ctripcorp/main_fix_context_type
change json body with application-json
2 parents ffe74dc + ff3a229 commit 8ec4496

File tree

1 file changed

+4
-0
lines changed
  • flybirds/core/plugin/plugins/default/web

1 file changed

+4
-0
lines changed

flybirds/core/plugin/plugins/default/web/page.py

+4
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ def handle_route(route):
590590
mock_body = mock_body.get("flybirdsMockResponse")
591591
if not isinstance(mock_body, str):
592592
mock_body = json.dumps(mock_body)
593+
route.fulfill(status=200,
594+
content_type="application/json;charset=UTF-8",
595+
body=mock_body)
596+
return
593597
if route.request.headers.get("content-type"):
594598
route.fulfill(status=200,
595599
content_type=route.request.headers.get("content-type"),

0 commit comments

Comments
 (0)