diff options
author | m0gg | 2006-03-23 12:58:24 +0000 |
---|---|---|
committer | m0gg | 2006-03-23 12:58:24 +0000 |
commit | 6819be5cdf6dcdcb84604b87396f89c72a030ad7 (patch) | |
tree | eb9778cb9ec2574d549d085093739ffff2f6b732 | |
parent | 2750aed2da50deb7274f8d19b0671a136b81f857 (diff) | |
download | csoap-6819be5cdf6dcdcb84604b87396f89c72a030ad7.tar.gz csoap-6819be5cdf6dcdcb84604b87396f89c72a030ad7.tar.bz2 |
httpd_get_protocol function added
-rw-r--r-- | nanohttp/nanohttp-server.c | 8 | ||||
-rw-r--r-- | nanohttp/nanohttp-server.h | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/nanohttp/nanohttp-server.c b/nanohttp/nanohttp-server.c index 2063c9f..75784c9 100644 --- a/nanohttp/nanohttp-server.c +++ b/nanohttp/nanohttp-server.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-server.c,v 1.53 2006/03/07 16:20:37 m0gg Exp $ +* $Id: nanohttp-server.c,v 1.54 2006/03/23 12:58:24 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -288,6 +288,12 @@ httpd_get_port(void) return _httpd_port; } +const char * +httpd_get_protocol(void) +{ + return hssl_enabled() ? "https" : "http"; +} + /* * ----------------------------------------------------- * FUNCTION: httpd_services diff --git a/nanohttp/nanohttp-server.h b/nanohttp/nanohttp-server.h index 20d7834..08c3e1c 100644 --- a/nanohttp/nanohttp-server.h +++ b/nanohttp/nanohttp-server.h @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: nanohttp-server.h,v 1.16 2006/03/06 13:37:38 m0gg Exp $ + * $Id: nanohttp-server.h,v 1.17 2006/03/23 12:58:24 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -79,6 +79,7 @@ int httpd_register_default(const char *ctx, httpd_service service); int httpd_register_secure_default(const char *ctx, httpd_service service, httpd_auth auth); int httpd_get_port(void); +const char *httpd_get_protocol(void); hservice_t *httpd_services(void); |