[Seaside] VW cgi interface
Brett Taylor
brett.taylor at healthauditors.com
Fri Mar 26 01:30:54 CET 2004
Avi, thanks for answering. I'm sure my response was a little over
stated earlier.
On Sat, 2004-03-20 at 17:42, Avi Bryant wrote:
> On Mar 20, 2004, at 5:22 PM, Brett Taylor wrote:
> >
> > First of all - thanks for the port. Seaside is great, and it sure is
> > nice to be able to work in my favorite Smalltalk(VW). No one on the
> > Seaside list seems to care about VW though.
>
> More that we don't know anything than that we don't care. I've been
> meaning to say that I'm very glad to see you forging ahead with the VW
> port even though it's pretty much unsupported. I would certainly love
> to see the Seaside/VW community grow, and it'll take some of you brave
> folk to push it forward. So, many thanks.
>
> I've actually seen some significant renewed interest in the port just
> recently. I'm hoping to be able to work with some VW users to make
> sure that when 2.5a is released (Real Soon Now, and all), the VW port
> can get updated very shortly thereafter.
I'll be glad to help on the port any way I can. Seaside is great and I
expect to be using it to deliver system in the future. Your 2.5
enhancements look to be very helpful.
>
> > I've found some areas that weren't implemented such as being able to
> > send "Forms" (Gif Images) out using the HtmlRender. I've made this
> > work in my image. Should I publish the changes to the public
> > reposistory?
>
> I'd like to see the changes so that I can think about how to abstract
> them into the SeasidePlatformSupport layer. It it possible to post a
> chunk-format (VW3 or whatever) changeset?
I've attached a file out that contains changes I made to Seaside to
1) Support GIF's when using the WAHtmlRenderer>>imageWithForm: aForm
api. This could be enhanced to do other types of images in the future.
2) Changes I need to make to allow the system to work with the
WebToolkits CGI interface.
Note: The Gif Image implementation assumes a transparency pixel at 0 at 0.
This worked for my application but may not be best for others.
Also note that I've only tested these changes using in 2 configurations:
1. APACHE with modperl CGI i/f which talks to the WaveIPRequestBroker.
This works with SSL.
2. I've also tested without Apache via the WaveHTTPRequestBroker.
>
> > Also, I've seen walkbacks that might have to do with finalization. I'm
> > getting DNU's sent to the Smallinteger 0. I've been ignoring it during
> > development but I'm going to have to get that fixed before deployment.
> > Have you noticed anything like this?
>
> That's ringing some serious bells. I think Roger Whitney solved that
> one a while back? Look back through the list archives...
Thanks for pointing this out. I found out that while I had loaded the
latest Seaside bundle in the Cincom repository, it didn't have the
ephemeron changes in it. I loaded the latest package with the change
and all is well.
>
> Avi
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>
-------------- next part --------------
'From VisualWorks?, 7.2 of November 3, 2003 on March 25, 2004 at 4:11:24 pm'!
"Package Seaside-Fixes*"!
!Graphics.Image methodsFor: 'converting'!
asMIMEDocument
^SeasidePlatformSupport mimeDocumentClass
contentType: 'image/gif'
content: (self
asGIFWithTransparentPoint: 0 @ 0)! !
!Seaside.WAHtmlRenderer methodsFor: 'documents'!
prefixFromBasePath: basePath
| prefix offset |
offset := actionUrl indexOfSubCollection: basePath startingAt: 1.
prefix := offset = 0
ifTrue: [String new]
ifFalse: [actionUrl copyFrom: 1 to: offset].
^prefix!
urlForDocument: anObject mimeType: mimeType
| doc basePath prefix |
doc := WADocumentHandler new document: anObject mimeType: mimeType.
basePath := WASession currentSession application basePath.
(actionUrl beginsWith: basePath)
ifTrue: [^WASession currentSession application urlForRequestHandler: doc]
ifFalse:
[prefix := self prefixFromBasePath: basePath.
^WASession currentSession application urlForRequestHandler: doc
prefix: prefix]! !
!Seaside.WASession methodsFor: 'accessing'!
basePath
"Modified for cgi interface"
| script |
script := initialRequest ifNotNil: [:req | req headerAt: 'SCRIPT_NAME' ifAbsent: [nil]].
script isNil
ifTrue: [^application basePath]
ifFalse: [^script , application basePath]! !
!Seaside.WARegistry methodsFor: 'public'!
urlForRequestHandler: anObject prefix: prefix
^self urlForRequestHandler: anObject path: prefix , self basePath! !
More information about the Seaside
mailing list