diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-03-04 16:22:53 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-03-04 16:22:53 +0100 |
commit | 628ee9303dd3a66ccf830df7a89278e11ded6569 (patch) | |
tree | 8f60bf7e3747986feed048b251e511899b821bbd /src/blogc-runserver/httpd.c | |
parent | 4c00812c31dfa42183c8b6586ccf102a6d65f61c (diff) | |
download | blogc-628ee9303dd3a66ccf830df7a89278e11ded6569.tar.gz blogc-628ee9303dd3a66ccf830df7a89278e11ded6569.tar.bz2 blogc-628ee9303dd3a66ccf830df7a89278e11ded6569.zip |
runserver: improve listen url output
Diffstat (limited to 'src/blogc-runserver/httpd.c')
-rw-r--r-- | src/blogc-runserver/httpd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/blogc-runserver/httpd.c b/src/blogc-runserver/httpd.c index 81bf252..af531b0 100644 --- a/src/blogc-runserver/httpd.c +++ b/src/blogc-runserver/httpd.c @@ -259,11 +259,13 @@ br_httpd_run(const char *host, unsigned short port, const char *docroot, goto cleanup; } - fprintf(stderr, - " * Running on http://%s:%d/ (max threads: %zu)\n" + fprintf(stderr, " * Running on http://%s", host); + if (port != 80) + fprintf(stderr, ":%hu", port); + fprintf(stderr, "/ (max threads: %zu)\n" "\n" "WARNING!!! This is a development server, DO NOT RUN IT IN PRODUCTION!\n" - "\n", host, port, max_threads); + "\n", max_threads); socklen_t len = sizeof(struct sockaddr_in); |