Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved htparser's ioloop to the library.
[ashd.git]
/
lib
/
req.c
diff --git
a/lib/req.c
b/lib/req.c
index
2671159
..
0ede229
100644
(file)
--- a/
lib/req.c
+++ b/
lib/req.c
@@
-89,6
+89,17
@@
char *getheader(struct hthead *head, char *name)
return(NULL);
}
return(NULL);
}
+void replrest(struct hthead *head, char *rest)
+{
+ char *tmp;
+
+ /* Do not free the current rest string yet, so that the new one
+ * can a subpart of the old one. */
+ tmp = head->rest;
+ head->rest = sstrdup(rest);
+ free(tmp);
+}
+
void headpreheader(struct hthead *head, const char *name, const char *val)
{
head->headers = srealloc(head->headers, sizeof(*head->headers) * (head->noheaders + 1));
void headpreheader(struct hthead *head, const char *name, const char *val)
{
head->headers = srealloc(head->headers, sizeof(*head->headers) * (head->noheaders + 1));