Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

Anyone familiar with Jakarta HttpClient?

Thread view: 
ohaya - 25 Dec 2006 05:08 GMT
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
Manish Pandit - 25 Dec 2006 06:47 GMT
> 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
ohaya - 25 Dec 2006 15:31 GMT
>> 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
[quoted text clipped - 3 lines]
> 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
ohaya - 25 Dec 2006 15:31 GMT
>> 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
[quoted text clipped - 3 lines]
> 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
Manish Pandit - 26 Dec 2006 05:35 GMT
> 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
ohaya - 26 Dec 2006 15:49 GMT
>> Is that ("http.protocol.single-cookie-header") the correct full name for
>> this parameter to HttpClient?
[quoted text clipped - 5 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.