Bug 38287 - Configure encoding flexibly
Summary: Configure encoding flexibly
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.1.1
Hardware: All other
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-16 14:01 UTC by Takayuki Kaneko
Modified: 2007-06-28 13:52 UTC (History)
0 users



Attachments
This patch will allow to configure encoding. (24.34 KB, patch)
2006-01-16 14:05 UTC, Takayuki Kaneko
Details | Diff
This patch targets branch rel-2-1/src, revision 369906 (24.73 KB, patch)
2006-01-23 08:04 UTC, Takayuki Kaneko
Details | Diff
updated patch (24.66 KB, patch)
2006-01-28 00:53 UTC, Takayuki Kaneko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Takayuki Kaneko 2006-01-16 14:01:59 UTC
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.
Comment 1 Takayuki Kaneko 2006-01-16 14:05:14 UTC
Created attachment 17431 [details]
This patch will allow to configure encoding.

Please check it out.

Regards,
Comment 2 Takayuki Kaneko 2006-01-21 14:24:16 UTC
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,
Comment 3 Sebb 2006-01-22 19:29:11 UTC
(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.
Comment 4 Takayuki Kaneko 2006-01-23 08:04:30 UTC
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,
Comment 5 Sebb 2006-01-23 14:56:38 UTC
(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?
Comment 6 Takayuki Kaneko 2006-01-28 00:53:40 UTC
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.
Comment 7 Takayuki Kaneko 2006-03-04 14:11:35 UTC
I forgot to change the status.
Comment 8 Sebb 2007-06-28 13:52:28 UTC
Encoding parameter has been added to Http samplers
Comment 9 The ASF infrastructure team 2022-09-24 20:37:36 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1665