get_asset.c
498 Bytes
#include "http/header.h"
#include "http/message.h"
#include "http/request.h"
#include "http/response.h"
HttpMessage
httpWorkerGetAsset(
HttpRequest request,
const char * fname,
const char * mime)
{
char * match;
HttpHeader header;
header = httpHeaderGet(
&(((HttpMessage)request)->header),
"If-None-Match");
if (NULL == header) {
match = "";
}
else {
match = (header->value)[0];
}
return (HttpMessage)httpResponseAsset(fname, mime, match);
}
// vim: set ts=4 sw=4: