I hope that I will be able to configure the encoding of request parameter not only UTF-8 on JMeter. I made a patche for this enhancement on JMeter 2.1.1. This patch will put the text field for encoding on Http Request Sampler, Http Request Default Configuration, and Http Proxy Server. Then it will carry encoding name from GUI to JOrphanUtils. At the same time, this patch includes another one for #38115. This issue is very important for real web systems. There are a lot of systems that doesn't use UTF8 encoding.
Created attachment 17431 [details] This patch will allow to configure encoding. Please check it out. Regards,
I'm worry about the difference between version 2.1.1 and 2.1.2. I hope that someone would check my patch before the difference will increase. Regards,
(In reply to comment #2) > I'm worry about the difference between version 2.1.1 and 2.1.2. There are unlikely to be too many changes in this area. > I hope that someone would check my patch before the difference will increase. A brief check shows that the change to MultipartUrlConfig.java is not backwards compatible. The patch changes the meaning of the 3-parameter addArgument() method. Likewise, it changes the signature of 2 of the public HTTPArgument constructors. Therefore I don't think the patch can be applied as it stands - it needs some further work.
Created attachment 17487 [details] This patch targets branch rel-2-1/src, revision 369906 Thanks for checking. I renew a patch that targets at the branch rel-2-1. As you said, there are not so much changes. And it is fixed around MultipartUrlConfig.java. I want to change HTTPArgument constructors because the encoding value is needed when we use the alreadyEncoded parameter. I really want to resolve this issue. Please let me know what can I do for it. Regards,
(In reply to comment #4) > Created an attachment (id=17487) [edit] > This patch targets branch rel-2-1/src, revision 369906 > Thanks for checking. I've not checked everything. > I renew a patch that targets at the branch rel-2-1. As you said, there are not > so much changes. And it is fixed around MultipartUrlConfig.java. > I want to change HTTPArgument constructors because the encoding value is needed > when we use the alreadyEncoded parameter. > I really want to resolve this issue. Please let me know what can I do for it. Sorry, but removing a public constructor is not backwards compatible. A new constructor can be added if required. Likewise, changing the meaning of the 3rd String parameter to addArgument() is not backwards compatible. If necessary, please create a new method. I found it confusing to have a field called "encode" - which sounds like a boolean flag - it would be clearer to me as "encoding". == I'm not entirely clear why it is necessary to have an extra "encoding" field on the HTTPSampler GUI. How do browsers know what encoding to use?
Created attachment 17522 [details] updated patch Thanks. I have revised the patch based on your comments. > I'm not entirely clear why it is necessary to have an > extra "encoding" field on the HTTPSampler GUI. > How do browsers know what encoding to use? Browsers know the encoding from http header or meta tag. But it is difficult for HttpProxy to manage encoding automatically. I think the developers of the web system know what encoding to use. So an extra encoding field is necessary for developers to configure encoding.
I forgot to change the status.
Encoding parameter has been added to Http samplers
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1665