Skip to content
Open
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
6 changes: 6 additions & 0 deletions app/steps/sendProxyRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ function sendProxyRequest(Container) {
if (bodyContent.length) {
var body = bodyContent;
var contentType = proxyReq.getHeader('Content-Type');
var scIndex = contentType ? contentType.indexOf(';') : -1;
if (scIndex >= 0) {
// contentTypes may contain semi-colon
// example: "application/x-www-form-urlencoded; charset=UTF-8"
contentType = contentType.substring(0, scIndex);
}
if (contentType === 'x-www-form-urlencoded' || contentType === 'application/x-www-form-urlencoded') {
try {
var params = JSON.parse(body);
Expand Down