Re: svn commit: r1806215 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java xdocs/changes.xml

2017-08-29 Thread Philippe Mouawad
Hi Felix,
Am I wrong to think that I should revet my last commit (which uses charset
for parameters) ?
and it would be acceptable that unencoded Chinese named file would end up
being corrupt ?

This is my understand as per Oleg answer and yours.

Thanks

On Mon, Aug 28, 2017 at 11:06 AM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
>
> Am 27. August 2017 22:23:20 MESZ schrieb Philippe Mouawad <
> philippe.moua...@gmail.com>:
> >Might be interesting :
> >https://stackoverflow.com/questions/20591599/why-arent-
> post-names-with-unicode-sent-correctly-when-using-
> multipart-form-data/20592910#20592910
>
> In my opinion RFC 2388 4.4 applies here and the filenames can be encoded
> using RFC 2231.
>
> Felix
>
> >
> >On Sun, Aug 27, 2017 at 8:04 PM, Philippe Mouawad <
> >philippe.moua...@gmail.com> wrote:
> >
> >> Hi Felix,
> >> I noticed while testing that Java Implementation also corrupts
> >Parameter
> >> name, so I think it's a bug also, but  I have a doubt regarding the
> >> encoding of parameter names, does RFC force a particular encoding for
> >them
> >> (US-ASCII) or can they be encoded in whatever encoding we want ?
> >>
> >> If you look at current code, I have added a check for Java
> >Implementation
> >> to check for corrupt "?_param" instead of "安_param"
> >>
> >> Please review and give your feedback.
> >>
> >> Thanks
> >>
> >> On Sun, Aug 27, 2017 at 2:41 PM, Philippe Mouawad <
> >> philippe.moua...@gmail.com> wrote:
> >>
> >>> Hi Felix,
> >>> Look also at this report for Aka HTTP following their fix to
> >>> https://github.com/akka/akka-http/issues/338
> >>>
> >>>- https://github.com/akka/akka-http/issues/647
> >>>
> >>> I confirmed current trunk has a similar issue, see
> >>> https://bz.apache.org/bugzilla/show_bug.cgi?id=61384#c6.
> >>>
> >>> So I committed my alternative patch, please review.
> >>>
> >>> Still , I don't think it fixes https://bz.apache.org/bugzilla
> >>> /show_bug.cgi?id=56141
> >>>
> >>>
> >>> Regards
> >>>
> >>> On Sun, Aug 27, 2017 at 12:21 PM, Philippe Mouawad <
> >>> philippe.moua...@gmail.com> wrote:
> >>>
>  Hi Felix,
>  I attached an alternative patch which :
> 
> - set surrounding header only if we have a charset
> - same for parameters
> 
>  I have asked a question on HC client mailing list:
> 
> - http://mail-archives.apache.org/mod_mbox/hc-httpclient-users
> /201704.mbox/%3CCAH9fUpbxye8-rydo143Bk%3Dr6q2QDJTEndhPmd5GQ3
> TjxtLpDxA%40mail.gmail.com%3E
> 
> > users/201704.mbox/%3CCAH9fUpbxye8-rydo143Bk%3Dr6q2QDJTEndhPmd5GQ3TjxtLpDxA
> %40mail.gmail.com%3E>
> 
>  I think the following bugs have potentially the same root cause:
> 
> - https://bz.apache.org/bugzilla/show_bug.cgi?id=61384
> - https://bz.apache.org/bugzilla/show_bug.cgi?id=60800
> - https://bz.apache.org/bugzilla/show_bug.cgi?id=56141
> 
>  See this interesting comment also:
> 
> - https://bz.apache.org/bugzilla/show_bug.cgi?id=56141#c4
> 
> 
>  Regards
> 
>  On Sun, Aug 27, 2017 at 10:59 AM, Felix Schumacher <
>  felix.schumac...@internetallee.de> wrote:
> 
> >
> >
> > Am 26. August 2017 15:11:19 MESZ schrieb Philippe Mouawad <
> > philippe.moua...@gmail.com>:
> > >Hi Felix,
> > >Are we sure that when encoding is UTF-8 there is no need to set
> >charset
> > >?
> >
> > We keep the charset. We only remove it from the surrounding
> >header.
> >
> > >
> > >AFAIK, there were already issue with Multipart forms even before
> > >refactoring.
> >
> > Right. The most questions I found stated that they had problems
> >when
> > the charset was set.
> >
> > What do you think would be the correct way?
> >
> > Felix
> >
> > >
> > >Thanks
> > >Thanks
> > >
> > >On Fri, Aug 25, 2017 at 9:02 PM,  wrote:
> > >
> > >> Author: fschumacher
> > >> Date: Fri Aug 25 19:02:36 2017
> > >> New Revision: 1806215
> > >>
> > >> URL: http://svn.apache.org/viewvc?rev=1806215=rev
> > >> Log:
> > >> Don't set the charset on enclosing multipart/form-data header.
> >It
> > >> irritates some servers.
> > >>
> > >> The charset was added sometime back while refactoring to use a
> >newer
> > >api
> > >> of http client.
> > >> See https://bz.apache.org/bugzilla/show_bug.cgi?id=56141 for
> >more
> > >info.
> > >>
> > >> Bugzilla Id: 61384
> > >>
> > >>
> > >> Modified:
> > >> jmeter/trunk/src/protocol/http/org/apache/jmeter/
> > >> protocol/http/sampler/HTTPHC4Impl.java
> > >> jmeter/trunk/xdocs/changes.xml
> > >>
> > >> Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/
> > >> protocol/http/sampler/HTTPHC4Impl.java
> > >> URL: 

Re: HTTP Request : What to do with the Parameters tab entries for every method (was HTTP Request : Behaviour of PUT)

2017-08-29 Thread Felix Schumacher

Am 27.08.2017 um 21:56 schrieb Philippe Mouawad:

Hello,
Any thought  on this ?
It is related to Bug *60782*

Thanks

If I read it right, it is about two things.

First, whether PUT (and other methods) should behave consistently and 
NOT ignore the parameters tab.

+1 from me. PUT and consorts should not ignore the parameters.

Second, whether the parameters entered in the tab should be appended to 
the url, or posted as body.
Current behaviour GET appends, POST uses the body and every other method 
ignores them.


I would start using the body for all methods except GET, as this is in 
my mind the most likely intended behaviour.


Felix (very sorry, that it took me so long to answer this)



On Tue, Feb 28, 2017 at 10:46 PM, Philippe Mouawad <
philippe.moua...@gmail.com> wrote:


Hello,
As per sebb will, I open a new discussion to decide:
1) what to do for each method
2) Which one takes precedence

Regards
Philippe