Revision: 14669
Author: adrian.chadd
Date: Sun May 16 14:38:01 2010
Log: Issue #108 - use the single call to create and add the http header to
the given
HttpHeader array. The parser now doesn't allocate its own header entries.
http://code.google.com/p/lusca-cache/source/detail?r=14669
Modified:
/branches/LUSCA_HEAD/libhttp/HttpHeaderParse.c
=======================================
--- /branches/LUSCA_HEAD/libhttp/HttpHeaderParse.c Sun May 16 00:08:02 2010
+++ /branches/LUSCA_HEAD/libhttp/HttpHeaderParse.c Sun May 16 14:38:01 2010
@@ -304,21 +304,7 @@
}
/* Create the entry and return it */
- e = memPoolAlloc(pool_http_header_entry);
- debug(55, 9) ("creating entry %p: near '%.*s'\n", e,
charBufferSize(field_start, field_end), field_start);
- e->id = id;
- /* set field name */
- if (id == HDR_OTHER)
- stringLimitInit(&e->name, field_start, name_len);
- else
- e->name = Headers[id].name;
- /* set field value */
- stringLimitInit(&e->value, value_start, field_end - value_start);
- e->active = 1;
- Headers[id].stat.seenCount++;
- Headers[id].stat.aliveCount++;
- debug(55, 9) ("created entry %p: '%.*s: %.*s'\n", e, strLen2(e->name),
strBuf2(e->name), strLen2(e->value), strBuf2(e->value));
- httpHeaderAddEntry(hdr, e);
+ (void) httpHeaderAddEntryStr2(hdr, id, field_start, name_len,
value_start, field_end - value_start);
return 1;
}
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.