[Seaside] Re: Serving static images from Squeak 3.9
Alan Capewell
alan.capewell at softwareag.co.uk
Mon Mar 26 12:38:29 UTC 2007
Matthias Berth <matthias.berth <at> googlemail.com> writes:
>
> ModFile>>processHttp
> | fullFilePath method response |
> method := ModCore method.
> (#(#GET #POST ) includes: method)
> ifFalse: [^ false].
> fullFilePath := ModDoc fullFilePath.
> (FileStream isAFileNamed: fullFilePath)
> ifFalse: [^ false].
> self processSubModules
> ifTrue: [^ true].
> response := HttpResponse
> fromStream: (FileDirectory default readOnlyFileNamed: fullFilePath).
> "Make the response contents stream binary. We are serving files
> so we want to serve them without any encoding / decoding interfering,
> right? "
> response contents binary.
> HttpResponse current: response.
> ^ true
>
> Cheers
>
> Matthias
>
Hi Matthias
That works for me. Not sure if it will create and UNIX-DOS Linefeed trauma but
I am not using it to transfer ascii files anyway.
Thanks for your help
Alan
More information about the Seaside
mailing list