PostMethod.setQueryString vs PostMethod.addParameter

View: New views
6 Messages — Rating Filter:   Alert me  

PostMethod.setQueryString vs PostMethod.addParameter

by charlie-87 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Java 1.6
HttpClient 3.1
OS: Windows & Linux

I'm seeing some odd behavior, I am trying to POST to a website, using the
setQueryString method with my test data, it works fine all goes well.  Using
the addParameter(key,value)  , I get a post fail ( unfortunately the website
doesn't report what's going wrong ).

Normally I'd say fine I'll just use the setQuery , but the real world data
is much bigger, and I'm getting a URL that exceeds the standards when I try
to post.

Has anyone else seen or experienced this ?

Thanks,
Charlie
csanders@...

Re: PostMethod.setQueryString vs PostMethod.addParameter

by olegk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jun 17, 2009 at 07:03:52PM -0500, charlie wrote:

> Java 1.6
> HttpClient 3.1
> OS: Windows & Linux
>
> I'm seeing some odd behavior, I am trying to POST to a website, using the
> setQueryString method with my test data, it works fine all goes well.  Using
> the addParameter(key,value)  , I get a post fail ( unfortunately the website
> doesn't report what's going wrong ).
>
> Normally I'd say fine I'll just use the setQuery , but the real world data
> is much bigger, and I'm getting a URL that exceeds the standards when I try
> to post.
>
> Has anyone else seen or experienced this ?
>

This does not sound like a client side issue to me. Most likely the server side
script differentiates between query arguments and request entity parameters.

Oleg



> Thanks,
> Charlie
> csanders@...

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...


Re: PostMethod.setQueryString vs PostMethod.addParameter

by charlie-87 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've succesfully used cURL to post to this website in the past, I don't
think its a server side issue.  Server side is using PERL if that means
anything.

On Thu, Jun 18, 2009 at 8:54 AM, Oleg Kalnichevski <olegk@...> wrote:

> On Wed, Jun 17, 2009 at 07:03:52PM -0500, charlie wrote:
> > Java 1.6
> > HttpClient 3.1
> > OS: Windows & Linux
> >
> > I'm seeing some odd behavior, I am trying to POST to a website, using the
> > setQueryString method with my test data, it works fine all goes well.
>  Using
> > the addParameter(key,value)  , I get a post fail ( unfortunately the
> website
> > doesn't report what's going wrong ).
> >
> > Normally I'd say fine I'll just use the setQuery , but the real world
> data
> > is much bigger, and I'm getting a URL that exceeds the standards when I
> try
> > to post.
> >
> > Has anyone else seen or experienced this ?
> >
>
> This does not sound like a client side issue to me. Most likely the server
> side
> script differentiates between query arguments and request entity
> parameters.
>
> Oleg
>
>
>
> > Thanks,
> > Charlie
> > csanders@...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@...
> For additional commands, e-mail: httpclient-users-help@...
>
>

Re: PostMethod.setQueryString vs PostMethod.addParameter

by olegk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jun 18, 2009 at 09:08:42AM -0500, charlie wrote:
> I've succesfully used cURL to post to this website in the past, I don't
> think its a server side issue.  Server side is using PERL if that means
> anything.
>

You are very welcome to disgree. This is the only explanation I can think of
given the description of the problem.

Oleg


> On Thu, Jun 18, 2009 at 8:54 AM, Oleg Kalnichevski <olegk@...> wrote:
>
> > On Wed, Jun 17, 2009 at 07:03:52PM -0500, charlie wrote:
> > > Java 1.6
> > > HttpClient 3.1
> > > OS: Windows & Linux
> > >
> > > I'm seeing some odd behavior, I am trying to POST to a website, using the
> > > setQueryString method with my test data, it works fine all goes well.
> >  Using
> > > the addParameter(key,value)  , I get a post fail ( unfortunately the
> > website
> > > doesn't report what's going wrong ).
> > >
> > > Normally I'd say fine I'll just use the setQuery , but the real world
> > data
> > > is much bigger, and I'm getting a URL that exceeds the standards when I
> > try
> > > to post.
> > >
> > > Has anyone else seen or experienced this ?
> > >
> >
> > This does not sound like a client side issue to me. Most likely the server
> > side
> > script differentiates between query arguments and request entity
> > parameters.
> >
> > Oleg
> >
> >
> >
> > > Thanks,
> > > Charlie
> > > csanders@...
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@...
> > For additional commands, e-mail: httpclient-users-help@...
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...


Re: PostMethod.setQueryString vs PostMethod.addParameter

by charlie-87 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ill setup perl cgi and use both methods against them and just dump the the
headers and such, see if there is any difference.

On Thu, Jun 18, 2009 at 9:13 AM, Oleg Kalnichevski <olegk@...> wrote:

> On Thu, Jun 18, 2009 at 09:08:42AM -0500, charlie wrote:
> > I've succesfully used cURL to post to this website in the past, I don't
> > think its a server side issue.  Server side is using PERL if that means
> > anything.
> >
>
> You are very welcome to disgree. This is the only explanation I can think
> of
> given the description of the problem.
>
> Oleg
>
>
> > On Thu, Jun 18, 2009 at 8:54 AM, Oleg Kalnichevski <olegk@...>
> wrote:
> >
> > > On Wed, Jun 17, 2009 at 07:03:52PM -0500, charlie wrote:
> > > > Java 1.6
> > > > HttpClient 3.1
> > > > OS: Windows & Linux
> > > >
> > > > I'm seeing some odd behavior, I am trying to POST to a website, using
> the
> > > > setQueryString method with my test data, it works fine all goes well.
> > >  Using
> > > > the addParameter(key,value)  , I get a post fail ( unfortunately the
> > > website
> > > > doesn't report what's going wrong ).
> > > >
> > > > Normally I'd say fine I'll just use the setQuery , but the real world
> > > data
> > > > is much bigger, and I'm getting a URL that exceeds the standards when
> I
> > > try
> > > > to post.
> > > >
> > > > Has anyone else seen or experienced this ?
> > > >
> > >
> > > This does not sound like a client side issue to me. Most likely the
> server
> > > side
> > > script differentiates between query arguments and request entity
> > > parameters.
> > >
> > > Oleg
> > >
> > >
> > >
> > > > Thanks,
> > > > Charlie
> > > > csanders@...
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: httpclient-users-unsubscribe@...
> > > For additional commands, e-mail: httpclient-users-help@...
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@...
> For additional commands, e-mail: httpclient-users-help@...
>
>

Re: PostMethod.setQueryString vs PostMethod.addParameter

by olegk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

charlie wrote:
> Ill setup perl cgi and use both methods against them and just dump the the
> headers and such, see if there is any difference.
>

You do not need to do that. Just turn the wire logging on.

http://hc.apache.org/httpclient-3.x/logging.html

Oleg

> On Thu, Jun 18, 2009 at 9:13 AM, Oleg Kalnichevski <olegk@...> wrote:
>
>> On Thu, Jun 18, 2009 at 09:08:42AM -0500, charlie wrote:
>>> I've succesfully used cURL to post to this website in the past, I don't
>>> think its a server side issue.  Server side is using PERL if that means
>>> anything.
>>>
>> You are very welcome to disgree. This is the only explanation I can think
>> of
>> given the description of the problem.
>>
>> Oleg
>>
>>
>>> On Thu, Jun 18, 2009 at 8:54 AM, Oleg Kalnichevski <olegk@...>
>> wrote:
>>>> On Wed, Jun 17, 2009 at 07:03:52PM -0500, charlie wrote:
>>>>> Java 1.6
>>>>> HttpClient 3.1
>>>>> OS: Windows & Linux
>>>>>
>>>>> I'm seeing some odd behavior, I am trying to POST to a website, using
>> the
>>>>> setQueryString method with my test data, it works fine all goes well.
>>>>  Using
>>>>> the addParameter(key,value)  , I get a post fail ( unfortunately the
>>>> website
>>>>> doesn't report what's going wrong ).
>>>>>
>>>>> Normally I'd say fine I'll just use the setQuery , but the real world
>>>> data
>>>>> is much bigger, and I'm getting a URL that exceeds the standards when
>> I
>>>> try
>>>>> to post.
>>>>>
>>>>> Has anyone else seen or experienced this ?
>>>>>
>>>> This does not sound like a client side issue to me. Most likely the
>> server
>>>> side
>>>> script differentiates between query arguments and request entity
>>>> parameters.
>>>>
>>>> Oleg
>>>>
>>>>
>>>>
>>>>> Thanks,
>>>>> Charlie
>>>>> csanders@...
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: httpclient-users-unsubscribe@...
>>>> For additional commands, e-mail: httpclient-users-help@...
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@...
>> For additional commands, e-mail: httpclient-users-help@...
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...