}
if (is_multipart) {
- sprintf(boundary, "=_Citadel_Multipart_%s_%04x%04x",
+ sprintf(boundary, "Citadel--Multipart--%s--%04x--%04x",
serv_info.serv_fqdn,
getpid(),
++seq
if (WC->upload_length > 0) {
+ lprintf(9, "%s:%d: we are uploading %d bytes\n", __FILE__, __LINE__, WC->upload_length);
/** There's an attachment. Save it to this struct... */
att = malloc(sizeof(struct wc_attachment));
memset(att, 0, sizeof(struct wc_attachment));
}
if (strlen(bstr("cancel_button")) > 0) {
+ lprintf(9, "%s:%d: cancel button was pressed\n", __FILE__, __LINE__);
sprintf(WC->ImportantMessage,
_("Cancelled. Message was not posted."));
} else if (strlen(bstr("attach_button")) > 0) {
+ lprintf(9, "%s:%d: attach button was pressed\n", __FILE__, __LINE__);
display_enter();
return;
} else if (atol(bstr("postseq")) == dont_post) {
+ lprintf(9, "%s:%d: postseq does not match\n", __FILE__, __LINE__);
sprintf(WC->ImportantMessage,
_("Automatically cancelled because you have already "
"saved this message."));
}
dont_post = atol(bstr("postseq"));
} else {
+ lprintf(9, "%s:%d: server post error\n", __FILE__, __LINE__);
sprintf(WC->ImportantMessage, "%s", &buf[4]);
display_enter();
return;
{
struct urlcontent *u;
- /* lprintf(9, "upload_handler() name=%s, type=%s, len=%d\n",
- name, cbtype, length); */
+ lprintf(9, "upload_handler() name=%s, type=%s, len=%d\n", name, cbtype, length);
/* Form fields */
if ( (length > 0) && (strlen(cbtype) == 0) ) {
body_start = strlen(content);
/** Read the entire input data at once. */
- client_read(WC->http_sock, &content[BytesRead+body_start],
- ContentLength);
+ client_read(WC->http_sock, &content[BytesRead+body_start], ContentLength);
- if (!strncasecmp(ContentType,
- "application/x-www-form-urlencoded", 33)) {
+ if (!strncasecmp(ContentType, "application/x-www-form-urlencoded", 33)) {
addurls(&content[body_start]);
} else if (!strncasecmp(ContentType, "multipart", 9)) {
content_end = content + ContentLength + body_start;
- mime_parser(content, content_end, *upload_handler,
- NULL, NULL, NULL, 0);
+ mime_parser(content, content_end, *upload_handler, NULL, NULL, NULL, 0);
}
} else {
content = NULL;