[Seaside] Serving static graphics with comanche

Wilkes Joiner wilkesjoiner at gmail.com
Thu Dec 22 20:41:41 CET 2005


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
>
>
>


More information about the Seaside mailing list