diff options
author | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-15 17:00:39 +0000 |
---|---|---|
committer | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-15 17:00:39 +0000 |
commit | 21a9c9ee2dd95ffb5a9fc4c3f66a35caf796f87c (patch) | |
tree | dedfaf36406a9cb661c0497436ae3e2f7e89c1ad /README | |
parent | 39366eb76565d3516e78047cc96f09b66524bf13 (diff) |
Updating documentation for use of HTTP_Write command.
Tom
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@15 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'README')
-rw-r--r-- | README | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -43,9 +43,6 @@ followed by '/foo' followed by '/'. The httpRequest structure contains various pieces of information - -request->filedes The file descriptor of the socket to write - to. - request->body The body of the http request. This is empty for a GET. @@ -84,19 +81,23 @@ or header does not exist. Writing to the browser: ---------------------- -Currently this is done via the 'write' command. This takes three -arguments - the file-descripter, a buffer, and the length of the -buffer. +This is done with the + +HTTP_Write(httpRequest *request, const char *buffer, size_t count); + +function. This takes three arguments - the request, a buffer, and the +length of the buffer. The first line sent to the browser should be -write(request->filedes, "HTTP/1.0 200 OK\r\n",19) + +HTTP_Write(request, "HTTP/1.0 200 OK\r\n",19) (or an error code, e.g. "404 Not Found"). This should be followed by any HTTP headers, such as "Content-Type", followed by "\r\n\r\n" and then the content of your page, or at least that's what the standard -says 8-). - +says 8-). You may make as many calls to this function as you like to +get the data to the browser. Examples: --------- |