improve usage message - frontends - front-ends for some sites (experiment) | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 37f79862d47d5099b4b2ae936dc7af8966a4a9e2 | |
parent ee630780f97caacdc83bbbf29c60be757394f017 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sun, 14 May 2023 12:15:38 +0200 | |
improve usage message | |
Diffstat: | |
M youtube/feed.c | 8 +++++--- | |
1 file changed, 5 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/youtube/feed.c b/youtube/feed.c | |
@@ -922,17 +922,19 @@ isvalidchannel(const char *s) | |
void | |
usage(void) | |
{ | |
+ const char *msg = "Bad Request, path should be the channel id + file e… | |
+ | |
if (cgimode) { | |
if (godmode) { | |
- printf("3Bad Request\tErr\t%s\t%s\r\n", server_name, s… | |
+ printf("3%s\tErr\t%s\t%s\r\n", msg, server_name, serve… | |
} else { | |
fputs("Status: 400 Bad Request\r\n", stdout); | |
fputs("Content-Type: text/plain; charset=utf-8\r\n\r\n… | |
- fputs("400 Bad Request\n", stdout); | |
+ printf("400 %s\n", msg); | |
} | |
exit(0); | |
} else { | |
- fputs("usage: feed <channelid> [atom|json|tsv]\n", stderr); | |
+ fputs("usage: feed <channelid> [atom|json|tsv|txt]\n", stderr); | |
exit(1); | |
} | |
} |