Anyone familiar with Jakarta HttpClient?

O

ohaya

Hi,

I was wondering if anyone here might be familiar with Jakarta HttpClient:

http://jakarta.apache.org/commons/httpclient/

I want to find out if it is possible to set one of the HttpClient
"preferences" non-programatically. In particular, I need to set the
"http.protocol.single-cookie-header" to true.

The reason for my question is that I'm working with an application that
uses HttpClient, and the application appears to be sending multiple
"Cookie:" HTTP headers, and I need to configure the app to combined
these "Cookie:" headers into a single "Cookie:" header.

I've posted on the HttpClient users mailing list a couple of days ago,
with no response, and can't seem to subscribe to the HttpClient
developers list, so I'm hoping that someone here might be able to help.

Thanks in advance!!

Jim
 
M

Manish Pandit

ohaya said:
I want to find out if it is possible to set one of the HttpClient
"preferences" non-programatically. In particular, I need to set the
"http.protocol.single-cookie-header" to true.
Not sure what you mean by non-programatically. You can either put the
name-value pairs in a properties file (making it declarative), or have
command line arguments drive the name-value pairs.

-cheers,
Manish
 
O

ohaya

Manish said:
Not sure what you mean by non-programatically. You can either put the
name-value pairs in a properties file (making it declarative), or have
command line arguments drive the name-value pairs.


Manish,

Either a way to do this via a properties file or via command line would
do.

I've tried the latter, adding
"-Dhttp.protocol.single-cookie-header=true" to the command line
(actually, in Java Control Panel), and it appears in the Java Console
debug output when I type "s", but the setting does not seem to be taking
effect, i.e., I still see multiple "Cookie:" headers being sent.

Is that ("http.protocol.single-cookie-header") the correct full name for
this parameter to HttpClient?

Jim
 
O

ohaya

Manish said:
Not sure what you mean by non-programatically. You can either put the
name-value pairs in a properties file (making it declarative), or have
command line arguments drive the name-value pairs.


Manish,

Either a way to do this via a properties file or via command line would
do.

I've tried the latter, adding
"-Dhttp.protocol.single-cookie-header=true" to the command line
(actually, in Java Control Panel), and it appears in the Java Console
debug output when I type "s", but the setting does not seem to be taking
effect, i.e., I still see multiple "Cookie:" headers being sent.

Is that ("http.protocol.single-cookie-header") the correct full name for
this parameter to HttpClient?

Jim
 
M

Manish Pandit

Is that ("http.protocol.single-cookie-header") the correct full name for
this parameter to HttpClient?

Thats strange...per the documentation on
http://jakarta.apache.org/commons/httpclient/preference-api.html, the
property name you are using seems to be correct. You might want to
check the bug list on Apache for this issue. Alternatively, you can
download the source code and check if this value is referenced - you
can add the source to eclipse and debug all the way down.

-cheers,
Manish
 
O

ohaya

Manish said:
Thats strange...per the documentation on
http://jakarta.apache.org/commons/httpclient/preference-api.html, the
property name you are using seems to be correct. You might want to
check the bug list on Apache for this issue. Alternatively, you can
download the source code and check if this value is referenced - you
can add the source to eclipse and debug all the way down.


Manish,

Thanks for your reply.

FYI, I've been on the HttpClient mailing list with Oleg, who I think is
one of the people that works on HttpClient, and it appears that there
isn't a way to set this particular parameter non-programatically, so I'm
going to have to try to see if I can get the vendor to add it, probably
as some kind of configuration option, since what I'm working with is a
COTS product, and I don't have their source.

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top