ProtoObjectObjectWARequestHandlerWADocumentHandler
| document | fileName | mimeDocument | mimeType |
| instance | class |
|---|---|
| as yet unclassified | as yet unclassified |
| document |
|---|
|
| fileName |
|---|
|
| mimeDocument |
|---|
|
| mimeType |
|---|
|
| as yet unclassified |
|---|
| = other |
^ (other species = self species and: [other document = self document]) and: [other mimeType = self mimeType] |
| document |
^ document |
| handleRequest: aRequest |
^ self response |
| hash |
^ self document hash bitXor: self mimeType hash |
| initializeWithDocument: anObject mimeType: mimeString fileName: fileString |
document _ anObject. mimeType _ mimeString. fileName _ fileString. |
| isActive |
^ true |
| mimeDocument |
^ mimeDocument ifNil: [mimeDocument _ document asMIMEDocument ] |
| mimeType |
^ mimeType |
| response |
| response | response _ WAResponse new. response contents: self mimeDocument contentStream text. response contentType: (mimeType ifNil: [self mimeDocument contentType]). response headerAt: 'Expires' put: 'Thu, 01 Jan 2095 12:00:00 GMT'. fileName ifNotNil: [response headerAt: 'Content-Disposition' put: 'attachment; filename=' , fileName]. ^ response |
| as yet unclassified |
|---|
| document: anObject mimeType: mimeString fileName: fileString |
^ self basicNew initializeWithDocument: anObject mimeType: mimeString fileName: fileString |