summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authorGravatar default2024-12-15 22:52:41 +0100
committerGravatar default2024-12-15 22:52:41 +0100
commitc6562fa39bc3b609429fea9064a94cf080922da5 (patch)
treeb28e0945fb1d17c0f9a4724fd657c5cc30efd2a9 /httpd.c
parentFixed crash in mastoapi_status() Emoji list. (diff)
downloadpenes-snac2-c6562fa39bc3b609429fea9064a94cf080922da5.tar.gz
penes-snac2-c6562fa39bc3b609429fea9064a94cf080922da5.tar.xz
penes-snac2-c6562fa39bc3b609429fea9064a94cf080922da5.zip
New function timeline_link_header().
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 81d2f9e..0eff657 100644
--- a/httpd.c
+++ b/httpd.c
@@ -279,6 +279,7 @@ void httpd_connection(FILE *f)
279 xs *payload = NULL; 279 xs *payload = NULL;
280 xs *etag = NULL; 280 xs *etag = NULL;
281 xs *last_modified = NULL; 281 xs *last_modified = NULL;
282 xs *link = NULL;
282 int p_size = 0; 283 int p_size = 0;
283 const char *p; 284 const char *p;
284 int fcgi_id; 285 int fcgi_id;
@@ -326,7 +327,7 @@ void httpd_connection(FILE *f)
326 status = oauth_get_handler(req, q_path, &body, &b_size, &ctype); 327 status = oauth_get_handler(req, q_path, &body, &b_size, &ctype);
327 328
328 if (status == 0) 329 if (status == 0)
329 status = mastoapi_get_handler(req, q_path, &body, &b_size, &ctype); 330 status = mastoapi_get_handler(req, q_path, &body, &b_size, &ctype, &link);
330#endif /* NO_MASTODON_API */ 331#endif /* NO_MASTODON_API */
331 332
332 if (status == 0) 333 if (status == 0)
@@ -426,6 +427,8 @@ void httpd_connection(FILE *f)
426 headers = xs_dict_append(headers, "etag", etag); 427 headers = xs_dict_append(headers, "etag", etag);
427 if (!xs_is_null(last_modified)) 428 if (!xs_is_null(last_modified))
428 headers = xs_dict_append(headers, "last-modified", last_modified); 429 headers = xs_dict_append(headers, "last-modified", last_modified);
430 if (!xs_is_null(link))
431 headers = xs_dict_append(headers, "Link", link);
429 432
430 /* if there are any additional headers, add them */ 433 /* if there are any additional headers, add them */
431 const xs_dict *more_headers = xs_dict_get(srv_config, "http_headers"); 434 const xs_dict *more_headers = xs_dict_get(srv_config, "http_headers");