diff options
author | swhite <swhite@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2004-04-13 13:42:54 +0000 |
---|---|---|
committer | swhite <swhite@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2004-04-13 13:42:54 +0000 |
commit | 310f5363afe8ed31b6381ff002991d5c7cfa6d96 (patch) | |
tree | 8915b41c6318d49e0577f63e4cce0cad2cdcdaad /src/http_Request.h | |
parent | 373f2b276ec87294bb96e5b148972303308f7763 (diff) |
Made HTTPD to correctly describe interface by INCLUDE HEADER mechanism.
Changed internal names of
http_Auth.h
http_Cookies.h
http_Steer.h
http_Content.h
so that HTTPD thorn developers will be required to use this interface,
rather than incorrectly explicitly including the source header files.
* Protected SString against C++ name mangling
* Gave exported functions the HTTP_ prefix
* Wrote doc/Content.h
* Fixed bug that disabled some steering functionality
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@192 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/http_Request.h')
-rw-r--r-- | src/http_Request.h | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/src/http_Request.h b/src/http_Request.h deleted file mode 100644 index e74e756..0000000 --- a/src/http_Request.h +++ /dev/null @@ -1,91 +0,0 @@ - /*@@ - @header http_Request.h - @date Wed Sep 13 23:49:30 2000 - @author Tom Goodale - @desc - - @enddesc - @version $Header$ - @@*/ - -#include "util_Hash.h" - -#ifndef __HTTP_REQUEST_H__ -#define __HTTP_REQUEST_H__ 1 - -typedef struct HTTPArg -{ - /* Public data */ - char *arg; - char *value; - - /* Private data */ - struct HTTPArg *next; - struct HTTPArg *all_next; -} httpArg; - -/* This is the main structure for storing data about a request. */ -typedef struct -{ - /* Public members of the structure. */ - char *body; /* The body of the request */ - int body_length; /* How long the body is */ - - char *method; /* The HTTP method */ - char *uri; /* The URI */ - char *residual; /* What's left of the URI after subtracting the found page */ - - /* HTTP version numbers */ - int http_major_version; - int http_minor_version; - - /* How many arguments there are */ - int n_arguments; - - /* These are all private members of this structure */ - - /* The connection data */ - void *connection; - - /* The request header lines */ - uHash *headers; - - /* Stuff for arguments */ - - /* First a hash table to look the data up quickly */ - uHash *arguments; - - /* Now a linked list to allow walking. */ - httpArg *firstarg; - httpArg *lastarg; - httpArg *currentarg; - -} httpRequest; - -#define BLANK_HTTPREQUEST {NULL, 0, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL } - -#ifdef __cplusplus -extern "C" -{ -#endif - -int HTTP_RegisterPage(const char *path, int (*function)(const cGH *, httpRequest *, void *), void *data); - -const char *HTTP_ArgumentValue(const httpRequest *request, const char *arg); - -const httpArg *HTTP_ArgumentWalk(httpRequest *request, int first); - -const char *HTTP_HeaderValue(const httpRequest *request, const char *header); - -int HTTP_Write(httpRequest *request, const char *buffer, size_t count); -int HTTP_Read(httpRequest *request, char *buffer, size_t count); - -int Send_HTTP( httpRequest *request, const char * message ); - -unsigned long int HTTP_Port(void); - -#ifdef __cplusplus -} -#endif - -#endif /* __HTTP_REQUEST_H__ */ |