diff options
author | default <nobody@localhost> | 2022-09-22 17:55:59 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-09-22 17:55:59 +0200 |
commit | 595ded1fc7999008a09a9370c69c8a9f9f9a28fb (patch) | |
tree | 7bf57d4a787c824288ae05935e06cbd77841b603 | |
parent | 7a60c71744f94edc66994537fddafaf0db594fb5 (diff) |
httpd serves susie.png.
-rw-r--r-- | httpd.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -10,6 +10,14 @@ #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, 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; } } + 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) |