summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-common.c
diff options
context:
space:
mode:
authorGravatar snowdrop2004-02-03 08:59:22 +0000
committerGravatar snowdrop2004-02-03 08:59:22 +0000
commit889a90340eec29e63cb7b8b8095442d5858ad7ce (patch)
tree041a9fd7635c6da7827e4c55c1fece2ed03b6281 /nanohttp/nanohttp-common.c
parentb3ecb22603e9187725810d1e1616fec01c5c063b (diff)
downloadcsoap-889a90340eec29e63cb7b8b8095442d5858ad7ce.tar.gz
csoap-889a90340eec29e63cb7b8b8095442d5858ad7ce.tar.bz2
develop
Diffstat (limited to 'nanohttp/nanohttp-common.c')
-rw-r--r--nanohttp/nanohttp-common.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/nanohttp/nanohttp-common.c b/nanohttp/nanohttp-common.c
index 55a9f7f..1d00d42 100644
--- a/nanohttp/nanohttp-common.c
+++ b/nanohttp/nanohttp-common.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-common.c,v 1.7 2004/01/21 12:28:20 snowdrop Exp $
+ * $Id: nanohttp-common.c,v 1.8 2004/02/03 08:59:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -255,6 +255,17 @@ void hpairnode_free(hpair_t *pair)
}
+void hpairnode_free_deep(hpair_t *pair)
+{
+ hpair_t *tmp;
+
+ while (pair != NULL) {
+ tmp = pair->next;
+ hpairnode_free(pair);
+ pair=tmp;
+ }
+}
+
char *hpairnode_get_ignore_case(hpair_t *pair, const char* key)
{
if (key == NULL) {
@@ -565,7 +576,15 @@ hrequest_t *hrequest_new_from_buffer(char *data)
void hrequest_free(hrequest_t *req)
{
- log_warn1("hrequest_free() not implemented!");
+ if (req == NULL) return;
+
+ free(req->method);
+ free(req->path);
+ free(req->spec);
+
+ hpairnode_free_deep(req->header);
+ hpairnode_free_deep(req->query);
+
}
/* response stuff */