[Seaside] Serving static graphics with comanche

Cédrick Béler cbeler at enit.fr
Tue Jan 3 11:04:34 CET 2006


Hi all and happy new year :)

My questions are related to Comanche and serving static files.

I want comanche to serve static files and seaside application. The 
latter is ok and static files is also ok  as long as it is html... but I 
cannot view for instance an image file (.jpg  .bmp ...)... the processor 
hangs (os: linux). Is it normal ? is it due to what's said in this post ?

I used the following configuration (I probably do not understand how 
comanche works). If someone can tell what's done by this few lines, that 
would propably help me (how web server work is not clear for me)?
Is there a tutorial or other for that... 
http://www.shaffer-consulting.com/david/Seaside/KomHelp/ does not work

| ma seaside |
seaside := WAKom default.
ma := ModuleAssembly core.
ma serverRoot: (FileDirectory default directoryNamed: 'Files') fullName.
ma alias: '/seaside' to: [ma addPlug: [:request | seaside process: request]].
ma documentRoot: (FileDirectory default directoryNamed: 'FileRoot') fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 9090 named: 'httpd') plug: ma rootModule


Last thing, is it better to serve these static files through Comanche or 
Apache (knowing that I'll use Apache with the mod_proxy in front of 
squeak ) ?


Thanks for all
Cédrick


Wilkes Joiner a écrit :

>It looks like this is fixed in the latest version.  Here is the code
>that is in 7.0.3 (KomHttpServer-gk.10)
>
>processHttp
>	"This method uses StandardFileStream explicitly instead
>	of relying on FileStream class>>concreteStream, since in this
>	case we just need to return the file 'as is' binary."
>
>	| fullFilePath method |
>	method := ModCore method.
>	(#(#GET #POST) includes: method) ifFalse: [^false].
>	fullFilePath := ModDoc fullFilePath.
>	(FileStream isAFileNamed: fullFilePath) ifFalse: [^false].
>	self processSubModules ifTrue: [^true].
>	HttpResponse current: (HttpResponse
>				fromStream: (StandardFileStream readOnlyFileNamed: fullFilePath)).
>	^true
>
>On 12/22/05, David Shaffer <cdshaffer at acm.org> wrote:
>  
>
>>There is a bug in Kom under Squeak 3.8.  If you are using Squeak 3.8 or
>>higher apply the attached workaround.  I submitted it to Goran but have
>>no idea when to expect it in live Kom distribution (Goran?).  Anyway I
>>hope this helps...
>>
>>David
>>
>>
>>
>>'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 26 October 2005 at 5:22:22 pm'!
>>!ModFile methodsFor: 'processing' stamp: 'cds 10/26/2005 17:21'!
>>processHttp
>>        | fullFilePath method |
>>        method := ModCore method.
>>        (#(#GET #POST) includes: method) ifFalse: [^false].
>>        fullFilePath := ModDoc fullFilePath.
>>        (FileStream isAFileNamed: fullFilePath) ifFalse: [^false].
>>        self processSubModules ifTrue: [^true].
>>        HttpResponse current: (HttpResponse
>>                                fromStream: ((FileDirectory default readOnlyFileNamed: fullFilePath) binary; yourself)).
>>        ^true! !
>>
>>
>>_______________________________________________
>>Seaside mailing list
>>Seaside at lists.squeakfoundation.org
>>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>>    
>>
>_______________________________________________
>Seaside mailing list
>Seaside at lists.squeakfoundation.org
>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>  
>

-- 

*/Cédrick/**/ Béler/*

*/DOCTORANT/*

* *

*L*aboratoire *G*énie de *P*roduction - Equipe Production Automatisée

Ecole Nationale d'Ingénieurs de Tarbes - http://www.enit.fr 
<http://www.enit.fr/>

 

47, Avenue d'Azereix - BP 1629

F-65016 TARBES Cedex - FRANCE

 

_Phone:_      (+33) (0)5 62 44 27 00 (poste 28 37)

_Fax:_        (+33) (0)5 62 44 27 08

_Mobile:_     (+33) (0)6 81 33 02 04

 

E-mail: cbeler at enit.fr <mailto:cbeler at enit.fr>



More information about the Seaside mailing list