[Seaside-dev] Issue 97 in seaside: Per anchor control of flipping
between http and https for a session rather than whole application
codesite-noreply at google.com
codesite-noreply at google.com
Sun Jul 13 16:05:41 UTC 2008
Issue 97: Per anchor control of flipping between http and https for a
session rather than whole application
http://code.google.com/p/seaside/issues/detail?id=97
New issue report by ramon.leon:
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'
Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the seaside-dev
mailing list