diff options
author | snowdrop | 2004-02-03 08:59:22 +0000 |
---|---|---|
committer | snowdrop | 2004-02-03 08:59:22 +0000 |
commit | 889a90340eec29e63cb7b8b8095442d5858ad7ce (patch) | |
tree | 041a9fd7635c6da7827e4c55c1fece2ed03b6281 /nanohttp/nanohttp-common.c | |
parent | b3ecb22603e9187725810d1e1616fec01c5c063b (diff) | |
download | csoap-889a90340eec29e63cb7b8b8095442d5858ad7ce.tar.gz csoap-889a90340eec29e63cb7b8b8095442d5858ad7ce.tar.bz2 |
develop
Diffstat (limited to 'nanohttp/nanohttp-common.c')
-rw-r--r-- | nanohttp/nanohttp-common.c | 23 |
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 */ |