summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-request.c
diff options
context:
space:
mode:
authorGravatar snowdrop2006-07-09 16:24:18 +0000
committerGravatar snowdrop2006-07-09 16:24:18 +0000
commit8e94d40e90b5ed006090af64ff7017a2d4f1a802 (patch)
treed75f7d201eb5cf7236f2d0dc1ca18a44910eda49 /nanohttp/nanohttp-request.c
parent1b6cc73eff4ecc9ec0b2be81841d495a3cb53fc9 (diff)
downloadcsoap-8e94d40e90b5ed006090af64ff7017a2d4f1a802.tar.gz
csoap-8e94d40e90b5ed006090af64ff7017a2d4f1a802.tar.bz2
ported logging function to a seperate file (nanohttp-logging.*)r1_1_0
and renamed all logging functions.
Diffstat (limited to 'nanohttp/nanohttp-request.c')
-rwxr-xr-xnanohttp/nanohttp-request.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/nanohttp/nanohttp-request.c b/nanohttp/nanohttp-request.c
index 04adf00..8350848 100755
--- a/nanohttp/nanohttp-request.c
+++ b/nanohttp/nanohttp-request.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-request.c,v 1.13 2006/03/07 16:20:37 m0gg Exp $
+* $Id: nanohttp-request.c,v 1.14 2006/07/09 16:24:19 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -41,6 +41,7 @@
#include <utils/alloc.h>
#endif
+#include "nanohttp-logging.h"
#include "nanohttp-common.h"
#include "nanohttp-request.h"
@@ -108,8 +109,22 @@ _hrequest_parse_header(char *data)
{
if (!strcmp(key, "POST"))
req->method = HTTP_REQUEST_POST;
- else
+ else if (!strcmp(key, "GET"))
req->method = HTTP_REQUEST_GET;
+ else if (!strcmp(key, "OPTIONS"))
+ req->method = HTTP_REQUEST_OPTIONS;
+ else if (!strcmp(key, "HEAD"))
+ req->method = HTTP_REQUEST_HEAD;
+ else if (!strcmp(key, "PUT"))
+ req->method = HTTP_REQUEST_PUT;
+ else if (!strcmp(key, "DELETE"))
+ req->method = HTTP_REQUEST_DELETE;
+ else if (!strcmp(key, "TRACE"))
+ req->method = HTTP_REQUEST_TRACE;
+ else if (!strcmp(key, "CONNECT"))
+ req->method = HTTP_REQUEST_CONNECT;
+ else
+ req->method = HTTP_REQUEST_UNKOWN;
}
/* below is key the path and tmp2 the spec */
key = (char *) strtok_r(tmp2, " ", &saveptr2);