get_header.c 389 Bytes
#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++);

	(request->header)[request->nheader++] = new(HttpHeader, name, value);
}

// vim: set ts=4 sw=4: