summaryrefslogtreecommitdiffstats
path: root/nanohttp
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp')
-rwxr-xr-xnanohttp/nanohttp-request.c4
-rw-r--r--nanohttp/nanohttp-server.c12
-rw-r--r--nanohttp/nanohttp-socket.c34
-rw-r--r--nanohttp/nanohttp-socket.h13
-rw-r--r--nanohttp/nanohttp-ssl.c8
-rw-r--r--nanohttp/nanohttp-ssl.h6
6 files changed, 19 insertions, 58 deletions
diff --git a/nanohttp/nanohttp-request.c b/nanohttp/nanohttp-request.c
index 97a2c21..04adf00 100755
--- a/nanohttp/nanohttp-request.c
+++ b/nanohttp/nanohttp-request.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-request.c,v 1.12 2006/03/06 13:37:38 m0gg Exp $
+* $Id: nanohttp-request.c,v 1.13 2006/03/07 16:20:37 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -267,7 +267,7 @@ hrequest_new_from_socket(hsocket_t *sock, hrequest_t ** out)
buffer[i + 1] = '\0'; /* for strmp */
-// log_error2("buffer=\"%s\"", buffer);
+/* log_error2("buffer=\"%s\"", buffer); */
if (i > 3)
{
diff --git a/nanohttp/nanohttp-server.c b/nanohttp/nanohttp-server.c
index 9a2c721..2063c9f 100644
--- a/nanohttp/nanohttp-server.c
+++ b/nanohttp/nanohttp-server.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-server.c,v 1.52 2006/03/06 13:37:38 m0gg Exp $
+* $Id: nanohttp-server.c,v 1.53 2006/03/07 16:20:37 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -175,10 +175,10 @@ _httpd_register_builtin_services(void)
{
if (_httpd_enable_service_list)
-;// httpd_register("/httpd/services", _httpd_list_services);
+;/* httpd_register("/httpd/services", _httpd_list_services); */
if (_httpd_enable_statistics)
-;// httpd_register("/httpd/statistics", _httpd_statistics);
+;/* httpd_register("/httpd/statistics", _httpd_statistics); */
return;
}
@@ -384,7 +384,7 @@ httpd_send_header (httpd_conn_t * res, int code, const char *text)
strcat (header, "Server: Nano HTTPD library\r\n");
/* set _httpd_connection status */
- // strcat (header, "Connection: close\r\n");
+ /* strcat (header, "Connection: close\r\n"); */
/* add pairs */
for(cur = res->header; cur; cur = cur->next)
@@ -500,7 +500,7 @@ do_req_timeout (int signum)
sigaction(SIGALRM, &req_timeout, NULL);
*/
- // XXX this is not real pretty, is there a better way?
+ /* XXX this is not real pretty, is there a better way? */
log_verbose1 ("Thread timeout.");
#ifdef WIN32
_endthread ();
@@ -790,7 +790,7 @@ httpd_add_headers (httpd_conn_t *conn, const hpair_t *values)
BOOL WINAPI
httpd_term (DWORD sig)
{
- // log_debug2 ("Got signal %d", sig);
+ /* log_debug2 ("Got signal %d", sig); */
if (sig == _httpd_terminate_signal)
_httpd_run = 0;
diff --git a/nanohttp/nanohttp-socket.c b/nanohttp/nanohttp-socket.c
index e1ee807..3f41652 100644
--- a/nanohttp/nanohttp-socket.c
+++ b/nanohttp/nanohttp-socket.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-socket.c,v 1.54 2006/03/06 13:37:38 m0gg Exp $
+* $Id: nanohttp-socket.c,v 1.55 2006/03/07 16:20:37 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -428,7 +428,7 @@ hsocket_read(hsocket_t *sock, byte_t * buffer, int total, int force, int *receiv
size_t totalRead;
size_t count;
-// log_verbose3("Entering hsocket_read(total=%d,force=%d)", total, force);
+/* log_verbose3("Entering hsocket_read(total=%d,force=%d)", total, force); */
totalRead = 0;
do
@@ -463,33 +463,3 @@ hsocket_read(hsocket_t *sock, byte_t * buffer, int total, int force, int *receiv
while (1);
}
-
-// #ifdef WIN32
-// herror_t
-// hsocket_block(hsocket_t *sock, int block)
-// {
-// unsigned long iMode;
-//
-// if (sock->sock < 0)
-// return herror_new("hsocket_block", HSOCKET_ERROR_NOT_INITIALIZED,
-// "Called hsocket_listen() before initializing!");
-//
-// iMode = (block == 0) ? 1 : 0; /* Non block mode */
-// if (ioctlsocket(sock.sock, FIONBIO, (u_long FAR *) & iMode) ==
-// INVALID_SOCKET)
-// {
-// int err = WSAGetLastError();
-// log_error2("ioctlsocket error %d", err);
-// return herror_new("hsocket_block", HSOCKET_ERROR_IOCTL,
-// "Socket error %d", err);
-// }
-//
-// return H_OK;
-// }
-// #else
-// herror_t
-// hsocket_block(hsocket_t *sock, int block)
-// {
-// return H_OK;
-// }
-// #endif
diff --git a/nanohttp/nanohttp-socket.h b/nanohttp/nanohttp-socket.h
index bbe5692..a5ef903 100644
--- a/nanohttp/nanohttp-socket.h
+++ b/nanohttp/nanohttp-socket.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-socket.h,v 1.25 2006/03/06 13:37:38 m0gg Exp $
+ * $Id: nanohttp-socket.h,v 1.26 2006/03/07 16:20:37 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -211,17 +211,6 @@ herror_t hsocket_send(hsocket_t *sock, const char *str);
herror_t hsocket_read(hsocket_t *sock, byte_t * buffer, int size, int force,
int *readed);
-/**
- Sets the goven socket to non-blocking socket mode.
-
- @param sock the socket to set into the non-blocking mode
-
- @returns H_OK if success. One of the followings if fails:<P>
- <BR>HSOCKET_ERROR_NOT_INITIALIZED
- <BR>HSOCKET_ERROR_IOCTL
-*/
-// herror_t hsocket_block(hsocket_t *sock, int block);
-
#ifdef __cplusplus
}
#endif
diff --git a/nanohttp/nanohttp-ssl.c b/nanohttp/nanohttp-ssl.c
index 1c0fe0e..74d289d 100644
--- a/nanohttp/nanohttp-ssl.c
+++ b/nanohttp/nanohttp-ssl.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-ssl.c,v 1.19 2006/03/07 11:32:42 m0gg Exp $
+* $Id: nanohttp-ssl.c,v 1.20 2006/03/07 16:20:37 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2001-2005 Rochester Institute of Technology
@@ -177,9 +177,11 @@ verify_sn (X509 * cert, int who, int nid, char *str)
static int
user_verify (X509 * cert)
{
- // TODO: Make sure that the client is providing a client cert,
- // or that the Module is providing the Module cert
+ /* TODO: Make sure that the client is providing a client cert,
+ or that the Module is providing the Module cert */
+
/* connect to anyone */
+
log_verbose1 ("Validating certificate.");
return 1;
}
diff --git a/nanohttp/nanohttp-ssl.h b/nanohttp/nanohttp-ssl.h
index d2b1aaf..f27a441 100644
--- a/nanohttp/nanohttp-ssl.h
+++ b/nanohttp/nanohttp-ssl.h
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-ssl.h,v 1.11 2006/03/07 11:32:42 m0gg Exp $
+* $Id: nanohttp-ssl.h,v 1.12 2006/03/07 16:20:37 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2001-2005 Rochester Institute of Technology
@@ -59,7 +59,7 @@ void hssl_cleanup(hsocket_t *sock);
/*
* Callback for password checker
*/
-//static int pw_cb(char* buf, int num, int rwflag, void *userdata);
+/* static int pw_cb(char* buf, int num, int rwflag, void *userdata); */
/*
* Quick function for verifying a portion of the cert
@@ -74,7 +74,7 @@ int verify_sn(X509 * cert, int who, int nid, char *str);
* Called by framework for verify
*/
-//static int verify_cb(int prev_ok, X509_STORE_CTX* ctx);
+/* static int verify_cb(int prev_ok, X509_STORE_CTX* ctx); */
/*
* This function MUST be implemented by user client/server code somewhere