You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "Sambaiah, Vishwas" <vi...@citigroup.com> on 2005/05/03 16:49:24 UTC
Problem with Cookies
Hello All,
I am trying to write a small web proxy type application for a web performance benchmarking tool. Though this application essentially is a web proxy server, it additionally has logic for generating custom test scripts etc due to which I cannot use off the shelf proxy server. I found that HttpClient was a neat reusable component to plug into my application. I have successfully integrated HttpClient component into my app, but I bumped into issues with cookies. After initial research through the archives of the mailing list, I realized that I should set the CookiePolicy.BROWSER_COMPATIBILITY for most browsers to work.
This solved most of my problems. However, I still have issues with cookies for ex. when I try logging into Yahoo mail. When I enter my username and password on the browser, the response page I get from the server is asking em to check if my browser is enabled to accept cookies. I am not too sure what is happening in the background but what I am sure is, the cookies arent set properly between the server and client browser.
I would really appreciate if someone point me in the right direction in solving the cookie issue as I have hit a bottleneck. Thanks in advace for helpful pointers.
Regards
Vish
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
SOMETIMES YOU NEED TO GO FAR, TO FIND WHAT IS CLOSEST TO YOU
Re: Problem with Cookies
Posted by Roland Weber <RO...@de.ibm.com>.
Hello Vish,
is your "web proxy server" configured as a proxy in the browser,
or are you pointing your browser directly to your web application,
which just happens to forward the requests someplace else?
In the second case, you may have an issue with the cookie domain.
A cookie set for domain .yahoo.com will not be sent to a host
proxy.mydomain.wherever.it.is. Cookies can be set without a
domain, in which case the domain is taken from the host that
set the cookie. That would explain why some cookies work, while
others don't.
hope that helps,
Roland
"Sambaiah, Vishwas" <vi...@citigroup.com>
03.05.2005 16:49
Please respond to
"HttpClient User Discussion"
To
"HttpClient User Discussion" <ht...@jakarta.apache.org>
cc
Subject
Problem with Cookies
Hello All,
I am trying to write a small web proxy type application for a web
performance benchmarking tool. Though this application essentially is a
web proxy server, it additionally has logic for generating custom test
scripts etc due to which I cannot use off the shelf proxy server. I found
that HttpClient was a neat reusable component to plug into my application.
I have successfully integrated HttpClient component into my app, but I
bumped into issues with cookies. After initial research through the
archives of the mailing list, I realized that I should set the
CookiePolicy.BROWSER_COMPATIBILITY for most browsers to work.
This solved most of my problems. However, I still have issues with cookies
for ex. when I try logging into Yahoo mail. When I enter my username and
password on the browser, the response page I get from the server is asking
em to check if my browser is enabled to accept cookies. I am not too sure
what is happening in the background but what I am sure is, the cookies
arent set properly between the server and client browser.
I would really appreciate if someone point me in the right direction in
solving the cookie issue as I have hit a bottleneck. Thanks in advace for
helpful pointers.
Regards
Vish
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
SOMETIMES YOU NEED TO GO FAR, TO FIND WHAT IS CLOSEST TO YOU