eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Comanche::HttpResponse':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: HttpResponse (in Comanche)


Inheritance:

   Object
   |
   +--Comanche::HttpResponse
      |
      +--Comanche::HttpPartialResponse

Package:
stx:goodies/webServer/comanche/swiki
Category:
Comanche-Kom-Protocol-HTTP
Version:
rev: 1.12 date: 2003/09/10 15:30:41
user: cg
file: HttpResponse.st directory: goodies/webServer/comanche/swiki
module: stx stc-classLibrary: swiki

Description:


kom/4.12 (Comanche/4.12)
bolot 2/20/2002 13:55
- cookies support
- defaultChunkSize delegates to Kom5Preferences

HttpResponse (bolot 4/2/2001 18:52)

Comment from kom46:
I am a response to an HttpRequest.  I can formulate an HTTP response and send it out over a socket.  An HttpAdapter will accept an HttpRequest, dispatch a method call to an HttpPlug (which will result in a stream or an error), and then formulat an instance of me to deliver the response to the client.


Class protocol:

initialization
o  initialize
HttpResponse initialize

o  initializeStatusCodes
HttpResponse initializeStatusCodes

instance creation
o  fromFileStream: aStream
fieldAt: 'Cache-Control' put: 'max-age=86400';

o  fromMIMEDocument: aMIMEDoc
fieldAt: 'Expires' put: (String streamContents: [:s |
(TimeStamp fromSeconds: (Time primSecondsClock + 86400)) printOnHTTP: s]);

o  fromRedirect: redirect

o  fromStream: aStream
fieldAt: 'Expires' put: 'Thu, 15 Apr 2010 20:00:00 GMT';

o  fromString: aString
fieldAt: 'Cache-Control' put: 'max-age=86400';

o  fromUrl: aUrl

o  status: aSymbol description: aString

o  status: aSymbol mimeDescription: aMIMEDocument

o  statusCodes


Instance protocol:

accessing
o  contentType

o  contentType: aMimeType

o  contents

o  contents: aStream

o  fieldAt: aString

o  fieldAt: aString ifAbsent: absBlock

o  fieldAt: aString ifAbsentPut: absBlock

o  fieldAt: aString put: aValue

o  fields

o  httpVersion

o  request

o  request: anHttpRequest

o  status

o  status: aSymbol

o  statusCode

o  statusCodeAndReason

accessing-cookies
o  cookies

o  setCookieName: nameString value: valueString expiresDate: expiresDate expiresTime: expiresTime path: pathString domain: domainString secure: secureBoolean
set a cookie in the Response

o  setCookieName: nameString value: valueString path: pathString
set a cookie in the Response

authentication
o  hashPassword: aPassword

o  secretWord

o  setUsername: aUsername
save the username in a cookie

o  setUsername: aUsername password: aPassword
save the username/password in cookies

comanche processing
o  asHttpPartialResponseBlock: aBlock

o  asHttpResponseTo: aRequest

defaults
o  defaultChunkSize

o  defaultContentType

initialize-release
o  destroy

responding
o  pvtWriteContentLengthOn: aStream

o  pvtWriteContentTypeOn: aStream

o  pvtWriteContentsOn: aStream
Processor yield.

o  pvtWriteCookiesOn: aStream

o  pvtWriteFieldsOn: aStream

o  pvtWriteServerOn: aStream

o  pvtWriteStatusOn: aStream

o  writeOn: aStream
Header



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 19 Nov 2018 09:35:49 GMT