get_header.c
443 Bytes
#include <search.h>
#include <ctype.h>
#include <stdio.h>
#include "class.h"
#include "interface/class.h"
#include "http/header.h"
#include "http/request.h"
void
httpRequestParserGetHeader(HttpRequest request, char * line)
{
char * name = line;
char * value = strchr(line, ':');
*(value++) = 0;
for (; *value == ' ' && *value != 0; value++);
httpHeaderAdd(&(request->header), new(HttpHeader, name, value));
}
// vim: set ts=4 sw=4: