Public Member Functions | |
| constructor newPath newSt newConfig | |
| close | |
| mimeType | |
| etag | |
| entityMatches etag | |
| entityNewerThan rfc2616 | |
| match request | |
| noneMatch request | |
| modifiedSince request | |
| unmodifiedSince request | |
| mismatched | |
| stream event session | |
| headers | |
Static Public Attributes | |
| mimeTypes | |
| tanzer::file::constructor | newPath newSt newConfig | ||
Open a file at $newPath, passing information returned from [file stat] as a list in $newSt, and a list of key-value configuration pairs in $newConfig.
Configuration values required in $newConfig:
readsize
The number of bytes of a file to read at a time.
| tanzer::file::close |
Close the file channel held by the current tanzer::file object.
| tanzer::file::entityMatches | etag | ||
Returns true if the RFC 2616 Entity Tag specified in $etag matches the Entity Tag of the current file.
| tanzer::file::entityNewerThan | rfc2616 | ||
Returns true if the current file modification time matches the RFC 2616 timestamp provided in $rfc2616.
| tanzer::file::etag |
Return an RFC 2616 Entity Tag describing the current file.
| tanzer::file::headers |
Generate and return a [dict] of headers suitable for creating a response to serve the current file.
| tanzer::file::match | request | ||
Returns false if the tanzer::request object in $request lists an If-Match: header value that does not match the RFC 2616 Entity Tag of the current file. Otherwise, returns true.
| tanzer::file::mimeType |
Return the MIME type of the current file.
| tanzer::file::modifiedSince | request | ||
Returns false if the tanzer::request object in $request lists an If-Modified-Since: header value that is newer than the modification time of the current file. Otherwise, returns true.
| tanzer::file::noneMatch | request | ||
Returns false if the tanzer::request object in $request lists an If-None-Match: header value that matches the RFC 2616 Entity Tag of the current file. Otherwise, return true.
| tanzer::file::stream | event session | ||
Used as a callback for write events generated by [chan event] on a client channel. Calls ::tanzer::session::pipe to shuffle data from the file handle to the client socket.
| tanzer::file::unmodifiedSince | request | ||
Returns false if the tanzer::request object in $request lists an If-Unmodified-Since: header value that is older than the modification time of the current file. Otherwise, returns true.
1.8.8