Comache question (expires header in ModFile)
Brent Pinkney
brent.pinkney at aircom.co.za
Tue Sep 6 15:11:04 UTC 2005
Hi Göran,
> Well, I do. :) I am at work right now, but will be home at my Squeakish
> laptop later tonight.
> I will reply again then, it's just a few lines setting the correct
> response headers.
I have implemented this to get the same behaviour as Seaside. Perhaps we
need something like Apache's mod_expire in Comanche ?
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)
binary;
yourself).
response fieldAt: 'Expires' put: 'Thu, 01 Jan 2095 12:00:00 GMT'.
HttpResponse current: response.
^ true
!
cheers
Brent
--
Brent Pinkney
Aircom International (SA)
cell: +27 83 518 4167
tel: +27 11 324 3615
fax: +27 11 784 8027
e-mail: brent.pinkney at aircom.co.za
More information about the Squeak-dev
mailing list
|