#include "vserver.h"
VirtualServer* vs_new() {
VirtualServer *vs = malloc(
sizeof(VirtualServer));
vs->objects =
NULL;
vs->document_root = sstr(
"docs");
vs->acls =
NULL;
vs->log =
NULL;
vs->ref =
1;
return vs;
}
VirtualServer* vs_copy(VirtualServer *vs,
pool_handle_t *pool) {
VirtualServer *newvs = malloc(
sizeof(VirtualServer));
newvs->ref =
1;
newvs->document_root = sstrdup_pool(pool, vs->document_root);
newvs->host = sstrdup_pool(pool, vs->host);
newvs->name = sstrdup_pool(pool, vs->name);
newvs->objectfile = sstrdup_pool(pool, vs->objectfile);
newvs->acls = vs->acls;
acl_data_ref(newvs->acls);
newvs->log = vs->log;
newvs->objects = vs->objects;
return newvs;
}
char* vs_translate_uri(
const VirtualServer *vs,
const char *uri) {
return NULL;
}