hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <ortwin.glu...@nose.ch>
Subject Re: Refesh Button Issue !1!
Date Mon, 30 Aug 2004 14:10:38 GMT

Are you writing some kind of 'proxy' like in the image below?

Browser <----> your proxy <----> the webapp requiring authentication

A webapp needs to keep track of a user in the user session (internal 
state). HTTP provides the cookie mechanism to enable webapps to match a 
session with a request. If you proxy the communication to a webapp you 
must be able to provide the right session cookie to the application.

That means that your proxy needs to establish both, a session with the 
webapp and a session with the client and do the translation between the 
two. Please note, that cookies are subject to security restrictions. A 
cookie can only be set and read by the same host(domain). This means 
that you have to proxy *all* communication between the client and the 
webapp. You can not only perform the login by the proxy and then access 
the webapp directly from the client bypassing the proxy. This also means 
that you need to do URL rewriting in all the HTML code so that your 
proxy is used.

Ortwin Glück

Manish Moorjani wrote:

> Hi,
> I have written an application that uses Httpclient to automatic login into other Applications
> and display the home page on the browser.
> Some of the other applications use GET and some use POST for login .
> For an application that uses POST for login I face a strange issue.
> When I press the refresh button on the home page after login(accessing thru my application)
> It shows me the login screen !!!!
> I investigated further and found out this 
> When I tried accessing the application directly by going to login screen and then entering
> and password and then going to the home page
> Then when I press the  Refresh Button, I get a POP up which says that u are trying to
resubmit the
> information do u want to continue(Something like this)
> When I say yes, I again reach the home page as the login details are submitted again
> This happens because the browser knows that it was a POST request !!!!
> When I access the application thru my code it is a get request so the browser does not
try to resend the data and hence
> I am shown the login screen .
> Is there is a workaround possible ? Please help me
> Regards,
> Manish Moorjani
> Infosys Technologies Ltd.
> Phone: 91-44-24509530/40/50 Extn. 80395
> "If you are still amazed by something you accomplished yesterday then today has been
a waste"
> [removed quoted message that had nothing to do with this issue]

  NOSE applied intelligence ag

  ortwin glück                      [www]      http://www.nose.ch
  software engineer
  hardturmstrasse 171               [pgp id]           0x81CF3416
  8005 zürich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12

To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message