mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
httpd serves susie.png.
This commit is contained in:
parent
7a60c71744
commit
595ded1fc7
1 changed files with 14 additions and 0 deletions
14
httpd.c
14
httpd.c
|
@ -10,6 +10,14 @@
|
||||||
|
|
||||||
#include "snac.h"
|
#include "snac.h"
|
||||||
|
|
||||||
|
/* susie.png */
|
||||||
|
const char *susie =
|
||||||
|
"iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAQAAAAC"
|
||||||
|
"CEkxzAAAAUUlEQVQoz43R0QkAMQwCUDdw/y3dwE"
|
||||||
|
"vsvzlL4X1IoQkAisKmwfAFT3RgJHbQezpSRoXEq"
|
||||||
|
"eqCL9BJBf7h3QbOCCxV5EVWMEMwG7K1/WODtlvx"
|
||||||
|
"AYTtEsDU9F34AAAAAElFTkSuQmCC";
|
||||||
|
|
||||||
|
|
||||||
void server_get_handler(d_char *req, char *q_path, int *status,
|
void server_get_handler(d_char *req, char *q_path, int *status,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
|
@ -67,6 +75,12 @@ void server_get_handler(d_char *req, char *q_path, int *status,
|
||||||
*body = s;
|
*body = s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
if (strcmp(q_path, "/susie.png") == 0) {
|
||||||
|
*status = 200;
|
||||||
|
*body = xs_base64_dec(susie, b_size);
|
||||||
|
*ctype = "image/png";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void httpd_connection(int rs)
|
void httpd_connection(int rs)
|
||||||
|
|
Loading…
Reference in a new issue