Consistently use application/json for json content
(1) By anonymous on 2021-10-08 14:09:02 [source]
Use application/json
instead of text/json
(like everywhere else in Fossil).
Index: src/info.c
==================================================================
--- src/info.c
+++ src/info.c
@@ -1948,11 +1948,11 @@
iFrom, iTo);
return;
}
content_get(rid, &content);
g.isConst = 1;
- cgi_set_content_type("text/json");
+ cgi_set_content_type("application/json");
ln = 0;
while( go && ln<iFrom ){
go = blob_line(&content, &line);
ln++;
}
Index: src/unversioned.c
==================================================================
--- src/unversioned.c
+++ src/unversioned.c
@@ -657,11 +657,11 @@
char *zSep = "[";
Blob json;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
- cgi_set_content_type("text/json");
+ cgi_set_content_type("application/json");
etag_check(ETAG_DATA,0);
if( !db_table_exists("repository","unversioned") ){
blob_init(&json, "[]", -1);
cgi_set_content(&json);
return;