You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by insom <da...@gmail.com> on 2008/09/10 01:20:48 UTC

https flips to http

First, thanks to all of you who have helped me out as I've worked through my
first Wicket project. The site is finally finished and we're in the process
of deploying it to our live servers. However, there's one last hitch. When I
go to our URL, https://test.domain.edu/myapp/, the browser goes to the
correct Wicket homepage, but it switches from https to http, like so -
http://test.domain.edu/myapp/home.

The fact that it's getting to "/home" implies to me that Wicket is picking
up the request, and then for some reason converting the https to http. Can
anyone point me where I should look to solve this? Thanks again!
-- 
View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p19403303.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: https flips to http

Posted by Jeremy Thomerson <je...@wickettraining.com>.
You can look at the response headers and see where the redirect is coming
from.  You can also view source on the response (all from tamper data) and
see what it is exactly.

For instance, I have a server that requires HTTPS.  So, I use Apache to
redirect all port 80 requests to the port 443 equivalent.  Then, if it was
"/" that was requested, Wicket takes over and does a redirect to the
homepage.  The first redirect shows "Apache (CentOS)" as the server header
response.  The second (Wicket) shows "Apache-Coyote" - my servlet container.

Hope this helps....
-- 
Jeremy Thomerson
http://www.wickettraining.com

On Wed, Sep 10, 2008 at 11:14 AM, insom <da...@gmail.com> wrote:

>
> Here's what I see from using Tamper Data. It appears that there's a 302
> redirect causing the switch. Is that something Wicket does?
>
> http://www.nabble.com/file/p19414977/tamperData.gif
>
>
>
> Jeremy Thomerson-5 wrote:
> >
> > Wicket uses relative URLs, so at first guess, I'd think it was something
> > else.  Start with something like
>
> --
> View this message in context:
> http://www.nabble.com/https-flips-to-http-tp19403303p19414977.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: https flips to http

Posted by Jörn Zaefferer <jo...@googlemail.com>.
Setting the following security-constraint in your web.xml should fix that:

<security-constraint>
	<web-resource-collection>
		<web-resource-name>secure</web-resource-name>
		<url-pattern>/</url-pattern>
	</web-resource-collection>
	<user-data-constraint>
		<transport-guarantee>CONFIDENTIAL</transport-guarantee>
	</user-data-constraint>
</security-constraint>

It basically enforces ALL requests to SSL connections.

Jörn

On Wed, Sep 10, 2008 at 6:14 PM, insom <da...@gmail.com> wrote:
>
> Here's what I see from using Tamper Data. It appears that there's a 302
> redirect causing the switch. Is that something Wicket does?
>
> http://www.nabble.com/file/p19414977/tamperData.gif
>
>
>
> Jeremy Thomerson-5 wrote:
>>
>> Wicket uses relative URLs, so at first guess, I'd think it was something
>> else.  Start with something like
>
> --
> View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p19414977.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

RE: https flips to http

Posted by TahitianGabriel <gl...@piti.pf>.
Thank you for your help.
It was indeed a problem with the sendRedirect() and relative URLs with SSL
offloading.

Instead of adding some code (filter, wrapper, ...) to my webapp I ended up
using two AJP configuration in my server.xml (one for HTTP and one for
HTTPS) :
<!-- Define an AJP 1.3 Connector on port 8010 -->
<Connector port="8010" protocol="AJP/1.3" URIEncoding="UTF-8" />
<!-- Define an AJP 1.3 Connector on port 8011 -- for SSL -->
<Connector port="8011" protocol="AJP/1.3" URIEncoding="UTF-8" secure="true"
scheme="https" proxyPort="443"/>

And also configuring two workers in my workers.properties (one for port 8010
and one for port 8011)
worker.list=piti,pitissl
# Set properties for PITI (ajp13)
worker.piti.type=ajp13
worker.piti.host=127.0.0.1
worker.piti.port=8010
# Set properties for PITI (ajp13) - SSL
worker.pitissl.type=ajp13
worker.pitissl.host=127.0.0.1
worker.pitissl.port=8011

And then I use those workers in my virtual host configuration :
<VirtualHost *:443>
       ....
       # SSL
        JkMount  /* pitissl
</VirtualHost>
<VirtualHost *:80>
       ....
       # SSL
        JkMount  /* piti
</VirtualHost>






-- 
View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p24649872.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


RE: https flips to http

Posted by Alex Objelean <al...@yahoo.com>.
If you are using load balancer, than here is the solution:
http://www.satyakomatineni.com/akc/servlet/DisplayServlet?url=DisplayNoteMPURL&reportId=1711&ownerUserId=satya

Recently I had exactly same issue, now I solved it using this approach.

Alex Objelean

TahitianGabriel wrote:
> 
> Hi,
> 
> Did you ever solve this problem?
> I'm having the exact same problme with apache 2, tomcat 6 and wicket
> 1.3.6.
> Some of the Https URLs are redirect to Http. It seems to happen when I use
> the setResponsePage(Page) fonction.
> 
> Any help would be appreciate...
> 
> 
> 
> insom wrote:
>> 
>> Thanks to everyone who has suggested solutions. It turns out that the
>> issue is stranger than I thought, and it's not Wicket-specific. I'll
>> share what we've got, in case it helps anyone else (not that we have a
>> solution yet.)
>> 
>> We have a load balancer, Apache, and Tomcat handling requests. When any
>> servlet application is called, for example,
>> https://jprod01.chemeketa.edu/docs/ (which is one of the sample apps that
>> installs with Tomcat), it display perfectly fine if it has the "/" after
>> docs. But if the URL is https://jprod01.chemeketa.edu/docs (without the
>> "/") then browser automatically gets redirected to
>> http://jprod01.chemeketa.edu/docs/ (with the "/" but without the "s" in
>> "https"). Why? Who knows.
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p24624218.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: https flips to http

Posted by Dane Laverty <da...@gmail.com>.
The problem did eventually get solved, though I couldn't tell you how. It
was a server issue, so our server people finally figured it out. I'm sorry I
can be of any help to you here :(

Dane

On Wed, Jul 22, 2009 at 1:19 PM, TahitianGabriel <gl...@piti.pf> wrote:

>
> Hi,
>
> Did you ever solve this problem?
> I'm having the exact same problme with apache 2, tomcat 6 and wicket 1.3.6.
> Some of the Https URLs are redirect to Http. It seems to happen when I use
> the setResponsePage(Page) fonction.
>
> Any help would be appreciate...
>
>
>
> insom wrote:
> >
> > Thanks to everyone who has suggested solutions. It turns out that the
> > issue is stranger than I thought, and it's not Wicket-specific. I'll
> share
> > what we've got, in case it helps anyone else (not that we have a solution
> > yet.)
> >
> > We have a load balancer, Apache, and Tomcat handling requests. When any
> > servlet application is called, for example,
> > https://jprod01.chemeketa.edu/docs/ (which is one of the sample apps
> that
> > installs with Tomcat), it display perfectly fine if it has the "/" after
> > docs. But if the URL is https://jprod01.chemeketa.edu/docs (without the
> > "/") then browser automatically gets redirected to
> > http://jprod01.chemeketa.edu/docs/ (with the "/" but without the "s" in
> > "https"). Why? Who knows.
> >
>
> --
> View this message in context:
> http://www.nabble.com/https-flips-to-http-tp19403303p24613851.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

RE: https flips to http

Posted by TahitianGabriel <gl...@piti.pf>.
Hi,

Did you ever solve this problem?
I'm having the exact same problme with apache 2, tomcat 6 and wicket 1.3.6.
Some of the Https URLs are redirect to Http. It seems to happen when I use
the setResponsePage(Page) fonction.

Any help would be appreciate...



insom wrote:
> 
> Thanks to everyone who has suggested solutions. It turns out that the
> issue is stranger than I thought, and it's not Wicket-specific. I'll share
> what we've got, in case it helps anyone else (not that we have a solution
> yet.)
> 
> We have a load balancer, Apache, and Tomcat handling requests. When any
> servlet application is called, for example,
> https://jprod01.chemeketa.edu/docs/ (which is one of the sample apps that
> installs with Tomcat), it display perfectly fine if it has the "/" after
> docs. But if the URL is https://jprod01.chemeketa.edu/docs (without the
> "/") then browser automatically gets redirected to
> http://jprod01.chemeketa.edu/docs/ (with the "/" but without the "s" in
> "https"). Why? Who knows.
> 

-- 
View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p24613851.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


RE: https flips to http

Posted by insom <da...@gmail.com>.
Thanks to everyone who has suggested solutions. It turns out that the issue
is stranger than I thought, and it's not Wicket-specific. I'll share what
we've got, in case it helps anyone else (not that we have a solution yet.)

We have a load balancer, Apache, and Tomcat handling requests. When any
servlet application is called, for example,
https://jprod01.chemeketa.edu/docs/ (which is one of the sample apps that
installs with Tomcat), it display perfectly fine if it has the "/" after
docs. But if the URL is https://jprod01.chemeketa.edu/docs (without the "/")
then browser automatically gets redirected to
http://jprod01.chemeketa.edu/docs/ (with the "/" but without the "s" in
"https"). Why? Who knows.


Rikard Lindström wrote:
> 
> I have the same problem as above, and by using the Tamper Data plugin I
> get similar results.
> A request to https flips to http. Everything works ofc if both protocols
> are opened, but in production mode we only use https :(
> Do you have any ideas how to solve this issue?
> 

-- 
View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p19435935.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


RE: https flips to http

Posted by Rikard Lindström <ri...@nordea.com>.
I have the same problem as above, and by using the Tamper Data plugin I get
similar results.
A request to https flips to http. Everything works ofc if both protocols are
opened, but in production mode we only use https :(
Do you have any ideas how to solve this issue?

http://www.nabble.com/file/p19429650/redirect.bmp 


Jeremy Thomerson-5 wrote:
> 
> Wicket uses relative URLs, so at first guess, I'd think it was something
> else.  Start with something like 


-- 
View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p19429650.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


RE: https flips to http

Posted by insom <da...@gmail.com>.
Here's what I see from using Tamper Data. It appears that there's a 302
redirect causing the switch. Is that something Wicket does?

http://www.nabble.com/file/p19414977/tamperData.gif 



Jeremy Thomerson-5 wrote:
> 
> Wicket uses relative URLs, so at first guess, I'd think it was something
> else.  Start with something like 

-- 
View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p19414977.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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