#define BUFFER_SIZE 4096
#define ROOT_DIR "webroot"
+#define SERVER_NAME "localhost"
+#define CHARSET "iso-8859-1"
/* macros */
char *progname = NULL;
int port = 8080;
char *root = ROOT_DIR;
+char *servername = SERVER_NAME;
+char *charset = CHARSET;
/* help function */
}
closedir (pdir);
+ /* configuration */
+ conf_t conf = {root, servername, charset};
+
/* init network stack */
VERBOSE (DEBUG, PRINT ("Initializing socket\n"));
init_network_context ();
// processing
VERBOSE (DEBUG, PRINT ("Processing %s\n", data));
- len = processing (data, len, root, &output);
+ len = processing (data, len, &conf, &output);
VERBOSE (DEBUG, PRINT ("Sending data (%d)\n%s\n", len, data));
int rc = send_data (output, len);