|
Server 0.0.1
HTTP/REST server implementation
|
00001 00023 #include <search.h> 00024 #include <string.h> 00025 #include <stdio.h> 00026 00027 #include "http/response.h" 00028 #include "http/header.h" 00029 #include "http/interface/http_intro.h" 00030 #include "hash.h" 00031 00032 static char * string; 00033 00034 static 00035 inline 00036 void 00037 addHeaderString(const void * node) 00038 { 00039 string += httpHeaderToString((HttpHeader)node, string); 00040 } 00041 00042 char * 00043 httpMessageHeaderToString(HttpMessage response, char * _string) 00044 { 00045 HttpMessage message = (HttpMessage)response; 00046 00047 string = httpIntroToString(response, _string); 00048 00049 hashEach(message->header, addHeaderString); 00050 00051 *string++ = '\r'; 00052 *string++ = '\n'; 00053 00054 return string; 00055 } 00056 00057 // vim: set ts=4 sw=4: