#include "vserver.h"
#include <cx/hash_map.h>
VirtualServer* vs_new(
pool_handle_t *pool) {
VirtualServer *vs = pool_malloc(pool,
sizeof(VirtualServer));
ZERO(vs,
sizeof(VirtualServer));
vs->pool = pool;
vs->objects =
NULL;
vs->document_root = cx_mutstr(
"docs");
vs->acls =
NULL;
vs->log =
NULL;
vs->ref =
1;
return vs;
}
int vs_add_host(VirtualServer *vs, cxstring host) {
cxmutstr host_cp = cx_strdup_a(pool_allocator(vs->pool), host);
if(!vs->host.ptr) {
vs->host = host_cp;
}
return 0;
}
char* vs_translate_uri(
const VirtualServer *vs,
const char *uri) {
return NULL;
}