This commit is contained in:
chenjianxing 2020-12-28 14:20:51 +08:00
commit 85b90f3226
3 changed files with 13 additions and 4 deletions

View File

@ -18,6 +18,8 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
@ -26,7 +28,7 @@ public class JmeterDocumentParser {
private final static String STRING_PROP = "stringProp";
private final static String ARGUMENTS = "Arguments";
private final static String COLLECTION_PROP = "collectionProp";
private final static String HTTP_SAMPLER_PROXY = "MsHTTPSamplerProxy";
private final static String HTTP_SAMPLER_PROXY = "HTTPSamplerProxy";
private final static String ELEMENT_PROP = "elementProp";
public static byte[] parse(byte[] source) {
@ -154,7 +156,14 @@ public class JmeterDocumentParser {
if (!StringUtils.equals("?", u)) {
u += "&";
}
u += k + "=" + ScriptEngineUtils.calculate(v);
v = ScriptEngineUtils.calculate(v);
// urlencoder
try {
v = URLEncoder.encode(v, "UTF-8");
} catch (UnsupportedEncodingException e) {
LogUtil.error(e);
}
u += k + "=" + v;
return u;
});
ele.setTextContent(url + ((params != null && !params.equals("?")) ? params : ""));

View File

@ -11,7 +11,7 @@ Vue.use(VueRouter);
const router = new VueRouter({
routes: [
{path: "/", redirect: '/track/home'},
{path: "/", redirect: '/setting/personsetting'},
{
path: "/sidebar",
components: {

View File

@ -122,7 +122,7 @@ export default {
this.fileList = JSON.parse(JSON.stringify(files));
this.tableData = JSON.parse(JSON.stringify(files));
this.tableData.map(f => {
f.size = f.size + ' Bytes';
f.size = (f.size / 1024).toFixed(2) + ' KB';
});
})
},