You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by John Dempsey <jo...@yahoo.ie> on 2007/10/08 12:48:13 UTC

HttpClient encoding parameters when not wanted

Hi Guys,

I am currently reading in values from a data file and
using one of the values as a parameter name in a
httpclient sampler.
The parameter is to be sent with no value and no
equals sign.
Also there should be no encoding.

When sending this parameter with the Httpclient all
instances of the character "/" get changed to "%2F"
and an equals sign is appended to the end.
I have unchecked the boxes for "Encode?" and "Include
Equals?" and the content encoding box is empty.
Is there a special property somewhere else I need to
change?

This parameter is sent correctly if I use the normal
http request.
I changed to the http client to check for socket
timeouts.

Maybe I should go back to the normal requests and
include "-Dsun.net.client.defaultReadTimeout=1000" as
java parameter is mentioned in the thread below?
http://marc.info/?l=jmeter-user&m=107874827502836&w=2

Any advice on this?

Thanks.


Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HttpClient encoding parameters when not wanted

Posted by John Dempsey <jo...@yahoo.ie>.
Thanks Sebb.

Our test environment was dismantled today so I haven't
tried this out.
But I'll try it out later on a dev environment and see
how it goes.

John.

--- sebb <se...@gmail.com> wrote:

> OK, in that case I think there is a work-round.
> 
> If you use parameters with values but *no names*,
> then HttpClient (and
> Java http) will include the values in the POST body
> as is with no
> encoding or equals signs.
> 
> (This does not appear to be documented anywhere ...
> oops!)
> 
> You can test this by using the Mirror server.
> 
> Also, I suggest you update to 2.3; that has some
> fixes over 2.3RC4.
> 
> S.
> On 08/10/2007, John Dempsey <jo...@yahoo.ie>
> wrote:
> > Version 2.3RC4
> > Using HTTP method POST so sent as part of the
> body.
> > Java version 1.5 update 6.
> >
> > We have run a test since I sent the original email
> and
> > the java parameter for defaultReadTimeout seems to
> > have worked fine.
> > But it would be nice to get the httpclient working
> > correctly for the test as it offers more
> > functionality.
> >
> > Thanks.
> >
> > --- sebb <se...@gmail.com> wrote:
> >
> > > Which version of JMeter?
> > >
> > > Which HTTP method are you using? GET or PUT ?
> > >
> > > GET works fine for me with both samplers.
> > >
> > > Are you expecting the parameter to be sent as
> part
> > > of the URL or as
> > > part of the body?
> > >
> > > On 08/10/2007, John Dempsey
> <jo...@yahoo.ie>
> > > wrote:
> > > > Hi Guys,
> > > >
> > > > I am currently reading in values from a data
> file
> > > and
> > > > using one of the values as a parameter name in
> a
> > > > httpclient sampler.
> > > > The parameter is to be sent with no value and
> no
> > > > equals sign.
> > > > Also there should be no encoding.
> > > >
> > > > When sending this parameter with the
> Httpclient
> > > all
> > > > instances of the character "/" get changed to
> > > "%2F"
> > > > and an equals sign is appended to the end.
> > > > I have unchecked the boxes for "Encode?" and
> > > "Include
> > > > Equals?" and the content encoding box is
> empty.
> > > > Is there a special property somewhere else I
> need
> > > to
> > > > change?
> > > >
> > > > This parameter is sent correctly if I use the
> > > normal
> > > > http request.
> > > > I changed to the http client to check for
> socket
> > > > timeouts.
> > > >
> > > > Maybe I should go back to the normal requests
> and
> > > > include
> "-Dsun.net.client.defaultReadTimeout=1000"
> > > as
> > > > java parameter is mentioned in the thread
> below?
> > > >
> > >
> >
>
http://marc.info/?l=jmeter-user&m=107874827502836&w=2
> > > >
> > > > Any advice on this?
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > Send instant messages to your online friends
> > > http://uk.messenger.yahoo.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > Send instant messages to your online friends
> http://uk.messenger.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HttpClient encoding parameters when not wanted

Posted by sebb <se...@gmail.com>.
OK, in that case I think there is a work-round.

If you use parameters with values but *no names*, then HttpClient (and
Java http) will include the values in the POST body as is with no
encoding or equals signs.

(This does not appear to be documented anywhere ... oops!)

You can test this by using the Mirror server.

Also, I suggest you update to 2.3; that has some fixes over 2.3RC4.

S.
On 08/10/2007, John Dempsey <jo...@yahoo.ie> wrote:
> Version 2.3RC4
> Using HTTP method POST so sent as part of the body.
> Java version 1.5 update 6.
>
> We have run a test since I sent the original email and
> the java parameter for defaultReadTimeout seems to
> have worked fine.
> But it would be nice to get the httpclient working
> correctly for the test as it offers more
> functionality.
>
> Thanks.
>
> --- sebb <se...@gmail.com> wrote:
>
> > Which version of JMeter?
> >
> > Which HTTP method are you using? GET or PUT ?
> >
> > GET works fine for me with both samplers.
> >
> > Are you expecting the parameter to be sent as part
> > of the URL or as
> > part of the body?
> >
> > On 08/10/2007, John Dempsey <jo...@yahoo.ie>
> > wrote:
> > > Hi Guys,
> > >
> > > I am currently reading in values from a data file
> > and
> > > using one of the values as a parameter name in a
> > > httpclient sampler.
> > > The parameter is to be sent with no value and no
> > > equals sign.
> > > Also there should be no encoding.
> > >
> > > When sending this parameter with the Httpclient
> > all
> > > instances of the character "/" get changed to
> > "%2F"
> > > and an equals sign is appended to the end.
> > > I have unchecked the boxes for "Encode?" and
> > "Include
> > > Equals?" and the content encoding box is empty.
> > > Is there a special property somewhere else I need
> > to
> > > change?
> > >
> > > This parameter is sent correctly if I use the
> > normal
> > > http request.
> > > I changed to the http client to check for socket
> > > timeouts.
> > >
> > > Maybe I should go back to the normal requests and
> > > include "-Dsun.net.client.defaultReadTimeout=1000"
> > as
> > > java parameter is mentioned in the thread below?
> > >
> >
> http://marc.info/?l=jmeter-user&m=107874827502836&w=2
> > >
> > > Any advice on this?
> > >
> > > Thanks.
> > >
> > >
> > > Send instant messages to your online friends
> > http://uk.messenger.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
> >
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HttpClient encoding parameters when not wanted

Posted by John Dempsey <jo...@yahoo.ie>.
Version 2.3RC4
Using HTTP method POST so sent as part of the body.
Java version 1.5 update 6.

We have run a test since I sent the original email and
the java parameter for defaultReadTimeout seems to
have worked fine.
But it would be nice to get the httpclient working
correctly for the test as it offers more
functionality.

Thanks.

--- sebb <se...@gmail.com> wrote:

> Which version of JMeter?
> 
> Which HTTP method are you using? GET or PUT ?
> 
> GET works fine for me with both samplers.
> 
> Are you expecting the parameter to be sent as part
> of the URL or as
> part of the body?
> 
> On 08/10/2007, John Dempsey <jo...@yahoo.ie>
> wrote:
> > Hi Guys,
> >
> > I am currently reading in values from a data file
> and
> > using one of the values as a parameter name in a
> > httpclient sampler.
> > The parameter is to be sent with no value and no
> > equals sign.
> > Also there should be no encoding.
> >
> > When sending this parameter with the Httpclient
> all
> > instances of the character "/" get changed to
> "%2F"
> > and an equals sign is appended to the end.
> > I have unchecked the boxes for "Encode?" and
> "Include
> > Equals?" and the content encoding box is empty.
> > Is there a special property somewhere else I need
> to
> > change?
> >
> > This parameter is sent correctly if I use the
> normal
> > http request.
> > I changed to the http client to check for socket
> > timeouts.
> >
> > Maybe I should go back to the normal requests and
> > include "-Dsun.net.client.defaultReadTimeout=1000"
> as
> > java parameter is mentioned in the thread below?
> >
>
http://marc.info/?l=jmeter-user&m=107874827502836&w=2
> >
> > Any advice on this?
> >
> > Thanks.
> >
> >
> > Send instant messages to your online friends
> http://uk.messenger.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HttpClient encoding parameters when not wanted

Posted by sebb <se...@gmail.com>.
Which version of JMeter?

Which HTTP method are you using? GET or PUT ?

GET works fine for me with both samplers.

Are you expecting the parameter to be sent as part of the URL or as
part of the body?

On 08/10/2007, John Dempsey <jo...@yahoo.ie> wrote:
> Hi Guys,
>
> I am currently reading in values from a data file and
> using one of the values as a parameter name in a
> httpclient sampler.
> The parameter is to be sent with no value and no
> equals sign.
> Also there should be no encoding.
>
> When sending this parameter with the Httpclient all
> instances of the character "/" get changed to "%2F"
> and an equals sign is appended to the end.
> I have unchecked the boxes for "Encode?" and "Include
> Equals?" and the content encoding box is empty.
> Is there a special property somewhere else I need to
> change?
>
> This parameter is sent correctly if I use the normal
> http request.
> I changed to the http client to check for socket
> timeouts.
>
> Maybe I should go back to the normal requests and
> include "-Dsun.net.client.defaultReadTimeout=1000" as
> java parameter is mentioned in the thread below?
> http://marc.info/?l=jmeter-user&m=107874827502836&w=2
>
> Any advice on this?
>
> Thanks.
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org