#include <pthread.h>
#include <signal.h>
#include "webcit.h"
+#include "webserver.h"
#include "mime_parser.h"
/*
fstat(fileno(fp), &statbuf);
bytes = statbuf.st_size;
- fprintf(stderr, "Static: %s, %ld bytes\n", what, bytes);
+ lprintf(3, "Static: %s, %ld bytes\n", what, bytes);
wprintf("Content-length: %ld\n", (long) bytes);
wprintf("\n");
bigbuffer = malloc(bytes);
off_t thisblock;
off_t accomplished = 0L;
-
+ lprintf(5, "output_image() called\n");
serv_printf("OIMG %s|%s", bstr("name"), bstr("parm"));
serv_gets(buf);
if (buf[0] == '2') {
char *encoding, void *userdata)
{
- fprintf(stderr, "UPLOAD HANDLER CALLED\n");
- fprintf(stderr, " name = %s\n", name);
- fprintf(stderr, "filename = %s\n", filename);
- fprintf(stderr, "encoding = %s\n", encoding);
- fprintf(stderr, " type = %s\n", cbtype);
- fprintf(stderr, " length = %ld\n", (long)length);
+ lprintf(5, "UPLOAD HANDLER CALLED\n");
+ lprintf(5, " name = %s\n", name);
+ lprintf(5, "filename = %s\n", filename);
+ lprintf(5, "encoding = %s\n", encoding);
+ lprintf(5, " type = %s\n", cbtype);
+ lprintf(5, " length = %ld\n", (long)length);
if (length > 0) {
WC->upload = malloc(length);
memcpy(WC->upload, content, length);
}
else {
- fprintf(stderr, "malloc() failed: %s\n",
+ lprintf(9, "malloc() failed: %s\n",
strerror(errno));
}
}
}
if (ContentLength > 0) {
- fprintf(stderr, "Content length: %d\n", ContentLength);
+ lprintf(5, "Content length: %d\n", ContentLength);
content = malloc(ContentLength + 1);
memset(content, 0, ContentLength+1);
BytesRead = 0;