You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "martijn.list" <ma...@gmail.com> on 2011/06/30 10:53:51 UTC
How can I 'force' Tapestry to use HTTPS if the page was loaded via
HTTPS?
I have a page which can be loaded via http or https. I don't want to
enforce https using @Secure. When the user enters the page via https,
all form postings should be done with https (i.e., relative URLs) and
when the user enters the page via http, all form postings should be done
with http. In other words, keep using the same level of security you
started with. Currently when I load a page with https, all form URLs are
no longer relative and use http.
According to the docs (@ http://tapestry.apache.org/https.html) this is
the intended behavior.
"Links to non-secure pages from a secure page will do the reverse: a
complete URL with an "http" protocol will be used. In other words,
Tapestry manages the transition from insecure to secure and back again."
Is it possible to disable this? I want to keep using https if the page
was loaded via https and use http if loaded via http.
Kind regards,
Martijn Brinkers
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How can I 'force' Tapestry to use HTTPS if the page was loaded
via HTTPS?
Posted by Josh Canfield <jo...@gmail.com>.
Implement BaseURLSource and ignore the secure flag, instead base it on
whether the current request is secure.
On Jun 30, 2011 1:54 AM, "martijn.list" <ma...@gmail.com> wrote:
> I have a page which can be loaded via http or https. I don't want to
> enforce https using @Secure. When the user enters the page via https,
> all form postings should be done with https (i.e., relative URLs) and
> when the user enters the page via http, all form postings should be done
> with http. In other words, keep using the same level of security you
> started with. Currently when I load a page with https, all form URLs are
> no longer relative and use http.
>
> According to the docs (@ http://tapestry.apache.org/https.html) this is
> the intended behavior.
>
> "Links to non-secure pages from a secure page will do the reverse: a
> complete URL with an "http" protocol will be used. In other words,
> Tapestry manages the transition from insecure to secure and back again."
>
> Is it possible to disable this? I want to keep using https if the page
> was loaded via https and use http if loaded via http.
>
> Kind regards,
>
> Martijn Brinkers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
Re: How can I 'force' Tapestry to use HTTPS if the page was loaded
via HTTPS?
Posted by Jonathan Barker <jo...@gmail.com>.
Perhaps, but it wasn't immediately obvious at the time how that would
happen, and I haven't thought about it lately. If so, it would be nice to
have an alternate implementation of BaseURLSource included in T5 that could
be turned on with a switch.
I wanted the same behaviour as existed in T4.
On Thu, Jun 30, 2011 at 10:54 AM, Josh Canfield <jo...@gmail.com>wrote:
> > https://issues.apache.org/jira/browse/TAP5-167
>
> Couldn't logic in the base url source solve that case as well?
> On Jun 30, 2011 6:30 AM, "Jonathan Barker" <jo...@gmail.com>
> wrote:
> > Take a look at:
> >
> > https://issues.apache.org/jira/browse/TAP5-167
> >
> > Is this what you are looking for?
> >
> > Regards,
> > Jonathan
> >
> >
> > On Thu, Jun 30, 2011 at 4:53 AM, martijn.list <martijn.list@gmail.com
> >wrote:
> >
> >> I have a page which can be loaded via http or https. I don't want to
> >> enforce https using @Secure. When the user enters the page via https,
> >> all form postings should be done with https (i.e., relative URLs) and
> >> when the user enters the page via http, all form postings should be done
> >> with http. In other words, keep using the same level of security you
> >> started with. Currently when I load a page with https, all form URLs are
> >> no longer relative and use http.
> >>
> >> According to the docs (@ http://tapestry.apache.org/https.html) this is
> >> the intended behavior.
> >>
> >> "Links to non-secure pages from a secure page will do the reverse: a
> >> complete URL with an "http" protocol will be used. In other words,
> >> Tapestry manages the transition from insecure to secure and back again."
> >>
> >> Is it possible to disable this? I want to keep using https if the page
> >> was loaded via https and use http if loaded via http.
> >>
> >> Kind regards,
> >>
> >> Martijn Brinkers
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > Jonathan Barker
> > ITStrategic
>
--
Jonathan Barker
ITStrategic
Re: How can I 'force' Tapestry to use HTTPS if the page was loaded
via HTTPS?
Posted by Josh Canfield <jo...@gmail.com>.
> https://issues.apache.org/jira/browse/TAP5-167
Couldn't logic in the base url source solve that case as well?
On Jun 30, 2011 6:30 AM, "Jonathan Barker" <jo...@gmail.com>
wrote:
> Take a look at:
>
> https://issues.apache.org/jira/browse/TAP5-167
>
> Is this what you are looking for?
>
> Regards,
> Jonathan
>
>
> On Thu, Jun 30, 2011 at 4:53 AM, martijn.list <martijn.list@gmail.com
>wrote:
>
>> I have a page which can be loaded via http or https. I don't want to
>> enforce https using @Secure. When the user enters the page via https,
>> all form postings should be done with https (i.e., relative URLs) and
>> when the user enters the page via http, all form postings should be done
>> with http. In other words, keep using the same level of security you
>> started with. Currently when I load a page with https, all form URLs are
>> no longer relative and use http.
>>
>> According to the docs (@ http://tapestry.apache.org/https.html) this is
>> the intended behavior.
>>
>> "Links to non-secure pages from a secure page will do the reverse: a
>> complete URL with an "http" protocol will be used. In other words,
>> Tapestry manages the transition from insecure to secure and back again."
>>
>> Is it possible to disable this? I want to keep using https if the page
>> was loaded via https and use http if loaded via http.
>>
>> Kind regards,
>>
>> Martijn Brinkers
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Jonathan Barker
> ITStrategic
Re: How can I 'force' Tapestry to use HTTPS if the page was loaded
via HTTPS?
Posted by Jonathan Barker <jo...@gmail.com>.
Take a look at:
https://issues.apache.org/jira/browse/TAP5-167
Is this what you are looking for?
Regards,
Jonathan
On Thu, Jun 30, 2011 at 4:53 AM, martijn.list <ma...@gmail.com>wrote:
> I have a page which can be loaded via http or https. I don't want to
> enforce https using @Secure. When the user enters the page via https,
> all form postings should be done with https (i.e., relative URLs) and
> when the user enters the page via http, all form postings should be done
> with http. In other words, keep using the same level of security you
> started with. Currently when I load a page with https, all form URLs are
> no longer relative and use http.
>
> According to the docs (@ http://tapestry.apache.org/https.html) this is
> the intended behavior.
>
> "Links to non-secure pages from a secure page will do the reverse: a
> complete URL with an "http" protocol will be used. In other words,
> Tapestry manages the transition from insecure to secure and back again."
>
> Is it possible to disable this? I want to keep using https if the page
> was loaded via https and use http if loaded via http.
>
> Kind regards,
>
> Martijn Brinkers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jonathan Barker
ITStrategic