fix: post 参数encoding
This commit is contained in:
parent
2bdc7b6e29
commit
8d389f0298
|
@ -87,7 +87,12 @@ public class APIReportService {
|
||||||
|
|
||||||
// report
|
// report
|
||||||
report.setUpdateTime(System.currentTimeMillis());
|
report.setUpdateTime(System.currentTimeMillis());
|
||||||
report.setStatus(APITestStatus.Completed.name());
|
if (result.getError() > 0) {
|
||||||
|
report.setStatus(APITestStatus.Error.name());
|
||||||
|
} else {
|
||||||
|
report.setStatus(APITestStatus.Success.name());
|
||||||
|
}
|
||||||
|
|
||||||
apiTestReportMapper.updateByPrimaryKeySelective(report);
|
apiTestReportMapper.updateByPrimaryKeySelective(report);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package io.metersphere.commons.constants;
|
package io.metersphere.commons.constants;
|
||||||
|
|
||||||
public enum APITestStatus {
|
public enum APITestStatus {
|
||||||
Saved, Starting, Running, Reporting, Completed, Error
|
Saved, Starting, Running, Reporting, Completed, Error, Success
|
||||||
}
|
}
|
||||||
|
|
|
@ -646,10 +646,9 @@ class JMXHttpRequest {
|
||||||
}
|
}
|
||||||
let url = new URL(request.url);
|
let url = new URL(request.url);
|
||||||
this.hostname = decodeURIComponent(url.hostname);
|
this.hostname = decodeURIComponent(url.hostname);
|
||||||
this.pathname = decodeURIComponent(url.pathname);
|
|
||||||
this.port = url.port;
|
this.port = url.port;
|
||||||
this.protocol = url.protocol.split(":")[0];
|
this.protocol = url.protocol.split(":")[0];
|
||||||
this.pathname = this.getPostQueryParameters(request, this.pathname);
|
this.pathname = this.getPostQueryParameters(request, decodeURIComponent(url.pathname));
|
||||||
} else {
|
} else {
|
||||||
if (environment) {
|
if (environment) {
|
||||||
this.port = environment.port;
|
this.port = environment.port;
|
||||||
|
@ -666,7 +665,7 @@ class JMXHttpRequest {
|
||||||
path += '?';
|
path += '?';
|
||||||
request.parameters.forEach(parameter => {
|
request.parameters.forEach(parameter => {
|
||||||
if (parameter.name) {
|
if (parameter.name) {
|
||||||
path += (parameter.name + '=' + parameter.value + '&');
|
path += ((parameter.name) + '=' + (parameter.value) + '&');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue