Re-added support for https (#33)

This commit is contained in:
solusipse
2017-09-17 14:34:44 +02:00
parent 1cba8ad493
commit cdd910b150
3 changed files with 21 additions and 1 deletions

View File

@@ -201,6 +201,8 @@ void fiche_init(Fiche_Settings *settings) {
9999,
// slug length
4,
// https
false,
// buffer length
32768,
// user name
@@ -360,7 +362,12 @@ static void get_date(char *buf) {
static int set_domain_name(Fiche_Settings *settings) {
const char *prefix = "http://";
char *prefix = "";
if (settings->https) {
prefix = "https://";
} else {
prefix = "http://";
}
const int len = strlen(settings->domain) + strlen(prefix) + 1;
char *b = malloc(len);