hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang Su <yangsu2...@yahoo.com>
Subject Re: [Fwd: Any example on state(cookie) management across a series of connections?]
Date Tue, 18 Feb 2003 05:52:37 GMT
Actually my original code without your suggested
changes work for that step(i.e., POST is successful,
you can try to run the attached class, however, if I
modify the code to adapt your suggestion, it turns out
that it doesn't work, see the modified attachment --
WONT WORK) I think the problem is that the state seems
not to be maintained, and it is somehow weird why the
last get method should fail.

yang

--- Jeffrey Dever <jsdever@sympatico.ca> wrote:
>   Not sure about that chunk error, but HttpClient
> does not allow 
> forwards across hosts.  The webpage you posted is
> using a form based 
> login.  You should probablly look at the html source
> and figure out how 
> to do what the browser is doing, as opposed to what
> the user is doing. 
>  (read that twice)
> 
> Somthing like this should work:
> 
> PostMethod method = new PostMethod
>
"https://login.hotjobs.yahoo.com/display/resume?ct_hft=merge/login");
> NameValuePair[] params = new NameValuePair[]{
> 	new NameValuePair("yesno", "1")
> 	new NameValuePair("username", "xxx"),
> 	new NameValuePair("passwd", "xxx") };
> method.addParametersBody(params);
> 
> There are also some hidden input fields that you
> might want to 
> experiment with ... always fun ...
> 
> Jandalf.
> 
> 
> -------- Original Message --------
> Subject: Any example on state(cookie) management
> across a series of 
> connections?
> Date: Mon, 17 Feb 2003 19:37:20 -0800 (PST)
> From: Yang Su <yangsu2003@yahoo.com>
> Reply-To: "Commons HttpClient Project" 
> <commons-httpclient-dev@jakarta.apache.org>,
> inklesu@msn.com
> To: commons-httpclient-dev@jakarta.apache.org
> 
> 
> 
> Hi,
> 
> I am new here. I am trying to have a simulated http
> client whose purpose is to log onto www.hotjobs.com
> using username and password, I've written a
> program(which I attach) to achieve this, however,
> the
> final step which I try to connect to
> "http://my.hotjobs.yahoo.com/display/resume?xxxx",
> it
> fails with error like this:
> 
> java.io.IOException: Bad chunk size: The document
> has
> moved 
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
>
commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
>
commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message