Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 50032 invoked from network); 9 Aug 2004 01:35:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Aug 2004 01:35:59 -0000 Received: (qmail 12709 invoked by uid 500); 9 Aug 2004 01:35:51 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 12647 invoked by uid 500); 9 Aug 2004 01:35:50 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 12622 invoked by uid 99); 9 Aug 2004 01:35:50 -0000 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=FORGED_RCVD_HELO,URIBL_SBL X-Spam-Check-By: apache.org Received: from [66.111.4.26] (HELO out2.smtp.messagingengine.com) (66.111.4.26) by apache.org (qpsmtpd/0.27.1) with ESMTP; Sun, 08 Aug 2004 18:35:45 -0700 Received: from server2.messagingengine.com (server2.internal [10.202.2.133]) by mail.messagingengine.com (Postfix) with ESMTP id 0CF44C13F89 for ; Sun, 8 Aug 2004 21:35:42 -0400 (EDT) Received: by server2.messagingengine.com (Postfix, from userid 99) id 902927701B; Sun, 8 Aug 2004 21:35:42 -0400 (EDT) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.4 (F2.72; T1.001; A1.62; B3.01; Q3.01) References: <1091986146.23362.201924478@webmail.messagingengine.com> <1092000363.22504.11.camel@localhost.localdomain> Subject: Re: same instance of HttpClient seen as a different session withevery GET In-Reply-To: <1092000363.22504.11.camel@localhost.localdomain> To: "Jakarta Commons Users List" Date: Sun, 08 Aug 2004 20:35:42 -0500 From: "Stephen Charles Huey" X-Sasl-Enc: gJcF/cG55f3XwjvOaZdqeA 1092015342 Message-Id: <1092015342.952.201939666@webmail.messagingengine.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Anytime you're accessing a URL that begins with HTTPS you're using SSL, right? I didn't set this up, but I'm pretty sure the URL I'm accessing is behind SSL, and yes, I'm using the same HttpClient instance and just creating a new GetMethod every time through my while loop. ----- Original message ----- From: "Oleg Kalnichevski" To: "Jakarta Commons Users List" Date: Sun, 08 Aug 2004 23:26:03 +0200 Subject: Re: same instance of HttpClient seen as a different session with every GET I checked my log info, it struck me that every time my program accessed > the secure (HTTPS) URL it was page-scraping, a new session appeared to > be opened on the server instead of the server identifying my HttpClient > as being the same browser or whatever. Stephen, Just to make sure that I understand you right, are you talking about SSL session or HTTP session? If the latter is the case, does your application use a session cookie, and if so, do you use the same HttpState instance for consecutive HTTP GETs? Oleg On Sun, 2004-08-08 at 19:29, Stephen Charles Huey wrote: > I'm trying to use a small command line program with HttpClient to browse > our website every two minutes, and an instance of HttpClient is a member > of my program's class OurSiteBrowser. In the constructor, I set up the > Credentials to access our site using BASIC authentication like so: > > Credentials defaultcreds = new UsernamePasswordCredentials(user, > pass); > hc.getState().setCredentials(null, "www.oursite.com", > defaultcreds); > > > I have a while(true) loop that I use to GET a certain page on our > website, and at the end of the loop it always waits 2 minutes. The > session timeouts are set to approximately 2 hours, and I noticed while > running this overnight that my session count was hovering around 60+ (I > recently implemented a session listener to get more info than Tomcat was > giving me about our traffic). I don't really think anyone would have > been using this particular website in the middle of the night, and when > I checked my log info, it struck me that every time my program accessed > the secure (HTTPS) URL it was page-scraping, a new session appeared to > be opened on the server instead of the server identifying my HttpClient > as being the same browser or whatever. I'm using the httpclient-2.0.jar > -- shouldn't our website/Tomcat be identifying my HttpClient program as > the same browser and thus let it use the first session it creates for > it? > > Thanks, > Stephen > > P.S. I guess we might have some bad design somewhere as well, because > out of the total memory allocated to the JVM, the free memory kept > decreasing through the night. Strange, because during the day, even > though free memory often decreases a lot, it also climbs back up a lot. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org