#include "common.h"
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "reqhandler_file.h"
#include "buffer.h"
#include "conftable.h"
#include "http.h"
#include "logger.h"
#include "mime.h"
#include "misc.h"
#include "xmalloc.h"
Include dependency graph for reqhandler_file.c:
Go to the source code of this file.
Data Structures | |
struct | ReqHandlerFile |
Defines | |
#define | ALLOW "GET HEAD" |
hard coded allow: the server will not support smth else! | |
Functions | |
int | getAbsPath (char **abs_path, const char *path) |
converts path to an absolute path abs_path (if possible). More... | |
int | getSrcInfo (ReqHandlerFile this) |
puts some information to this . More... | |
int | rhfModulePreInit () |
initialize / calculate static values. More... | |
int | rhfModuleTerminate () |
free all static ressourcesallocated. More... | |
ReqHandlerFile | rhfInit (HttpProtHandler parent, const char *path_buf, int change_path) |
creates, initializes and returns a file-request Handler. More... | |
int | rhfReceive (ReqHandlerFile this, struct Buffer *buf) |
recieve some data... NOT IMPLEMENTED (only useful for POST). More... | |
int | rhfSend (ReqHandlerFile this, struct Buffer **buf) |
orders a ProtHandler to send buffered data. More... | |
int | rhfProcess (ReqHandlerFile this) |
process some data. More... | |
int | rhfIsDataPending (ReqHandlerFile this) |
checks if data is pending. More... | |
int | rhfTerminate (ReqHandlerFile this) |
terminates this . More... | |
int | rhfGetError (ReqHandlerFile this) |
returns the error of this . More... | |
size_t | rhfGetSourceSize (ReqHandlerFile this) |
returns the file size of the requested file. More... | |
time_t | rhfGetModTime (ReqHandlerFile this) |
returns the files modification date. More... | |
const char * | rhfGetAllow (ReqHandlerFile this) |
returns the allows connected to the file. More... | |
const char * | rhfGetContentType (ReqHandlerFile this) |
returns the files extension. More... |
Definition in file reqhandler_file.c.
|
converts path to an absolute path abs_path (if possible).
Definition at line 278 of file reqhandler_file.c. Referenced by rhfInit().
|
|
puts some information to
this
Definition at line 372 of file reqhandler_file.c. Referenced by rhfInit().
|
|
returns the allows connected to the file.
Definition at line 251 of file reqhandler_file.c. |
|
returns the files extension.
Definition at line 257 of file reqhandler_file.c. |
|
returns the error of
Definition at line 233 of file reqhandler_file.c. |
|
returns the files modification date.
Definition at line 246 of file reqhandler_file.c. |
|
returns the file size of the requested file.
Definition at line 241 of file reqhandler_file.c. |
|
creates, initializes and returns a file-request Handler.
error is set to the errorcode.
Definition at line 110 of file reqhandler_file.c. |
|
checks if data is pending.
Definition at line 212 of file reqhandler_file.c. |
|
initialize / calculate static values.
Definition at line 87 of file reqhandler_file.c. |
|
free all static ressourcesallocated.
Definition at line 102 of file reqhandler_file.c. |
|
process some data.
Definition at line 207 of file reqhandler_file.c. |
|
recieve some data... NOT IMPLEMENTED (only useful for POST).
Definition at line 166 of file reqhandler_file.c. |
|
orders a ProtHandler to send buffered data.
Definition at line 172 of file reqhandler_file.c. |
|
terminates
this and frees all allocated memory used by this .
Definition at line 217 of file reqhandler_file.c. |