Re: Ref-counted strings in Squid-2/Cacheboy

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Wed, 21 Jan 2009 13:31:42 +0100

fre 2009-01-16 klockan 12:53 -0500 skrev Adrian Chadd:

> So far, so good. It turns out doing this as an intermediary step
> worked out better than trying to replace the String code in its
> entirety with replacement code which doesn't assume NUL terminated
> strings.

Just a thought, but is there really any parsing step where we can not
just overwrite the next octet with a \0 to get null-terminated strings?
This is what the parser does today, right?

The HTTP parser certainly can in-place null-terminate everything. Header
names always ends with a : which we always throw away, and the data ends
with a newline which is also thrown away.

Regards
Henrik
Received on Wed Jan 21 2009 - 12:32:47 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 21 2009 - 12:00:26 MST