Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 31408 invoked from network); 26 Feb 2008 09:18:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2008 09:18:41 -0000 Received: (qmail 56905 invoked by uid 500); 26 Feb 2008 09:18:36 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 56887 invoked by uid 500); 26 Feb 2008 09:18:36 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 56878 invoked by uid 99); 26 Feb 2008 09:18:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 01:18:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 209.85.200.168 as permitted sender) Received: from [209.85.200.168] (HELO wf-out-1314.google.com) (209.85.200.168) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 09:18:02 +0000 Received: by wf-out-1314.google.com with SMTP id 27so3936017wfd.10 for ; Tue, 26 Feb 2008 01:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=xZswe2R2u5wzbBvesXGYT13Wy6e6H7UY2ruTXP13SJM=; b=hkwvnRoT47t6h/4dOgZCdwCmCE+FrAG3G4JEEk7kAYGg73JX7Z7rXSNCZ7SQc511QRCVxX6eCR/A00YU5Nv5CJVp5Lfwrj9Qr6XCt2q8ZjICPm9mLdnrDnj9kmbNwkJGJPx4rMenRUVki8LN6S2y1299ytRiExGCaq0g+mlmetg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Odz8plywoSH9gOMlUZJPWlvD5thtLTo/Qd1VbcBnNlTHxwEpH4Zgatrvd1oKoG2Pc9LC+Kwe8Csny1KIugycjDFtUBSv13KPts7AtMfU0QGJb61a4nJ0UVpVlW3tE6H1hO3x3/rPQob+nkenHo0r4Oq8/gaDYAMa9ROOrCn0JLM= Received: by 10.142.215.5 with SMTP id n5mr3436319wfg.11.1204017491957; Tue, 26 Feb 2008 01:18:11 -0800 (PST) Received: by 10.142.229.10 with HTTP; Tue, 26 Feb 2008 01:18:11 -0800 (PST) Message-ID: <25aac9fc0802260118p27e66877u4b62acf8a85945a4@mail.gmail.com> Date: Tue, 26 Feb 2008 09:18:11 +0000 From: sebb To: "HttpClient User Discussion" Subject: Re: DefaultHttpClient - getting contents of an iframe In-Reply-To: <1204014314.5647.11.camel@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1204014314.5647.11.camel@ubuntu> X-Virus-Checked: Checked by ClamAV on apache.org On 26/02/2008, Oleg Kalnichevski 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