/*
* Admin functions
*
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
snprintf(buf, sizeof buf, "%s:%s", username, password);
CtdlEncodeBase64(auth, buf, strlen(buf), 0);
- syslog(LOG_DEBUG, "try_login(username='%s',password=(%d bytes))", username, strlen(password));
+ syslog(LOG_DEBUG, "try_login(username='%s',password=(%d bytes))", username, (int)strlen(password));
ctdl_printf(c, "LOUT"); // log out, in case we were logged in
ctdl_readline(c, buf, sizeof(buf)); // ignore the result
* This file contains functions which handle all of the CalDAV "REPORT" queries
* specified in RFC4791 section 7.
*
- * Copyright (c) 2016 by the citadel.org team
+ * Copyright (c) 2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
* Called by caldav_report() to output a single item.
* Our policy is to throw away the list of properties the client asked for, and just send everything.
*/
-caldav_response(struct http_transaction *h, struct ctdlsession *c, StrBuf *ReportOut, StrBuf *ThisHref)
+void caldav_response(struct http_transaction *h, struct ctdlsession *c, StrBuf *ReportOut, StrBuf *ThisHref)
{
long msgnum;
StrBuf *Caldata = NULL;
/*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
/*
* Functions that handle communication with a Citadel Server
*
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
int len = 0;
int c = 0;
- if (buf == NULL) return;
+ if (buf == NULL) return(-1);
while (len < maxbytes) {
c = read(ctdl->sock, &buf[len], 1);
/*
* These utility functions loosely make up a Citadel protocol client library.
*
- * Copyright (c) 2016 by the citadel.org team
+ * Copyright (c) 2016-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
* Output an HTML message, modifying it slightly to make sure it plays nice
* with the rest of our web framework.
*
- * Copyright (c) 2005-2017 by the citadel.org team
+ * Copyright (c) 2005-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 3.
/*
* This module handles HTTP transactions.
*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 3.
/*
* Main entry point for the program.
*
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
/* Tell 'em who's in da house */
syslog(LOG_NOTICE, "MAKE WEBCIT GREAT AGAIN!");
- syslog(LOG_NOTICE, "Copyright (C) 1996-2017 by the citadel.org team");
+ syslog(LOG_NOTICE, "Copyright (C) 1996-2018 by the citadel.org team");
syslog(LOG_NOTICE, " ");
syslog(LOG_NOTICE, "This program is open source software: you can redistribute it and/or");
syslog(LOG_NOTICE, "modify it under the terms of the GNU General Public License, version 3.");
/*
* Message base functions
*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
do {
thisblock = read(c->sock, &h->response_body[bytes], (h->response_body_length - bytes));
bytes += thisblock;
- syslog(LOG_DEBUG, "Bytes read: %d of %d", bytes, h->response_body_length);
+ syslog(LOG_DEBUG, "Bytes read: %d of %d", (int)bytes, (int)h->response_body_length);
} while ((bytes < h->response_body_length) && (thisblock >= 0));
h->response_body[h->response_body_length] = 0; // null terminate it just for good measure
syslog(LOG_DEBUG, "content type: %s", content_type);
* and pass control back down to the HTTP layer to output the response back to
* the client.
*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
/*
* Room functions
*
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
* Functions in this module handle SSL encryption when WebCit is running
* as an HTTPS server.
*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software. You can redistribute it and/or
* modify it under the terms of the GNU General Public License, version 3.
/*
* Output static content
*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
/*
* TCP sockets layer
*
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
/*
* Convert text/plain to text/html
*
- * Copyright (c) 2017 by the citadel.org team
+ * Copyright (c) 2017-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 3.
}
-
/*
* Threaded message view
*
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
/*
* Utility functions
*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
void download_mime_component(struct http_transaction *h, struct ctdlsession *c, long msgnum, char *partnum);
StrBuf *text2html(const char *supplied_charset, int treat_as_wiki, char *roomname, long msgnum, StrBuf *Source);
StrBuf *variformat2html(StrBuf *Source);
-
-void *mallok(size_t size);
-void phree(void *ptr);
-void *reallok(void *ptr, size_t size);
-
+int ctdl_readline(struct ctdlsession *ctdl, char *buf, int maxbytes);
+void ctdl_c(struct http_transaction *h, struct ctdlsession *c);
+int webserver(char *webserver_interface, int webserver_port, int webserver_protocol);
+void ctdl_printf(struct ctdlsession *ctdl, const char *format,...);
+int webcit_tcp_server(const char *ip_addr, int port_number, int queue_len);
+void do_502(struct http_transaction *h);
+void do_404(struct http_transaction *h);
+void do_412(struct http_transaction *h);
+void UrlizeText(StrBuf* Target, StrBuf *Source, StrBuf *WrkBuf);
* connections, and dispatching active connections onto a pool of worker
* threads.
*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.