commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giles Parnell" <Giles.Parn...@yellgroup.com>
Subject HTTPClient - Determining HostConfiguration Protocol (HTTP / HTTPS)
Date Thu, 05 Feb 2004 09:33:36 GMT
Hello

I have posted this before, but have't had much luck in a response - so am
hoping persistance will stand me in good stead.

I am trying to determine the protocol of a request being sent. The main
site runs under http with only the registration portion runing under https.
Essentially all i want to do is a have a method that checks the protocol in
every action to ensure no one is randomly hitting URLs.

I thought i could do this through configuration in the web-xml, with
something like this:
  <security-constraint>
    <web-resource-collection>
        <web-resource-name>SecureWebReg</web-resource-name>
        <description>no description</description>
        <url-pattern>/*</url-pattern>
        <http-method>POST</http-method>
        <http-method>GET</http-method>
      </web-resource-collection>
      <user-data-constraint>
        <description>no description</description>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </user-data-constraint>
  </security-constraint>


This just seems to hang the request - when infact i would want to go to a
relevant error page.

If there a simple way i can use the HttpClient package with the  GetMethod
() and / or the method.getHostConfiguration() method (or any other way) to
determine the protocol being used ?

Regards
Giles




-----------------------------------------------------------------------

Yellow Pages 118 24 7 
'Whatever you want, wherever you are, 24 7'
Calls cost 40p per minute from most landlines


[Information] -- PostMaster:
This transmission is intended solely for the addressee(s) and may be confidential. If you
are not the named addressee, or if the message has been addressed to you in error, you must
not read, disclose, reproduce, distribute or use this transmission. 

Delivery of this message to any person other than the named addressee is not intended in any
way to waive confidentiality.  If you have received this transmission in error please contact
the sender or delete the message. 

Thank you.

Yell Limited, Queens Walk, Oxford Road, Reading, Berkshire, RG1 7PT. Registered in England
and Wales, registered number 4205228.

Yellow Pages Sales Limited, Queens Walk, Oxford Road, Reading, Berkshire, RG1 7PT. Registered
in England and Wales, registered number 1403041.

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


Mime
View raw message