You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to run a single site that flips back and forth between secure and non
secure pages
dynamically on a anchor to anchor basis and generating the unspecified anchors
correctly (I
hacked up my own versions of secureCallback: and unsecuredCallback: to do this
on
ReserveTravel) because setting the server port and server protocol globally on
the application
itself seems wrong, but maybe I'm missing something.
Here's what I currently do...
WAAnchorTag>>secureCallback: actionBlock
url := (canvas secureCallback: actionBlock) displayString
WAAnchorTag>>unsecuredCallback: actionBlock
url := (canvas unsecuredCallback: actionBlock) displayString
WARenderCanvas>>secureCallback: actionBlock
^ (context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock))
scheme: #https;
port: 443;
yourself
WARenderCanvas>>unsecuredCallback: actionBlock
^ (context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock))
scheme: #http;
port: 80;
yourself
That's enough to generate the anchors that force a switch to http or https and
seems generic
enough, but for allowing unspecified regular #callback: to work correctly for
both modes I use
something I think I got from Avi a few years ago that looks for an http header
from Apache in my
session class..
SSSession>>actionUrlForContinuation: aContinuation
| url |
url := super actionUrlForContinuation: aContinuation.
self useSSL ifTrue:
[ url
scheme: #https;
port: 443 ].
^ url
SSSession>>actionUrlForKey: aString
| url |
url := super actionUrlForKey: aString.
self useSSL ifTrue:
[ url
scheme: #https;
port: 443 ].
^ url
SSSession>>useSSL
^ currentRequest headers includesKey: 'arnhttps'
Original issue reported on code.google.com by ramon.l...@gmail.com on 13 Jul 2008 at 4:04
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
ramon.l...@gmail.com
on 13 Jul 2008 at 4:04The text was updated successfully, but these errors were encountered: