hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: DefaultHttpClient - getting contents of an iframe
Date Tue, 26 Feb 2008 09:18:11 GMT
On 26/02/2008, Oleg Kalnichevski <olegk@apache.org> wrote:
>
>  On Sun, 2008-02-24 at 19:00 -0400, Jeff Kerr wrote:
>  > Hi there, I've had some luck following the example at:
>  > http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientFormLogin.java
>  >
>  > to login to a web site then get a page I'm looking for.  The problem is that
>  > the page that comes back has an iframe reference who's source is what I
>  > actually want.  When I try to get that page with a POST or GET it detects
>  > that I'm not making the request from the iframe and redirects me to the
>  > enclosing page.
>  >
>  > Is there a way on my DefaultHttpClient to pretend I'm a browser making a
>  > request for an iframe within a page?
>
>
> Hi Jeff,
>
>  One can program HttpClient to generate virtually identical HTTP
>  messages. Generally you should follow a very simple approach: capture
>  HTTP packets generated by browser using a traffic analyzer or a proxy,
>  examine their composition, tweak HttpClient to generate similar /
>  identical packets.

Some things to look out for, which the server may be relying on:

Referer and User-Agent headers
Cookies

>  Hope this helps.
>
>  Oleg
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

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


Mime
View raw message