The custom ESI parser used in absence of libxml2 or libexpat parsers was
restricted to handling 64KB buffers but under some conditions could expand
to over 64KB during the parse process. Hitting this assertion.
TODO: the parser can now be redesigned to make use of Tokenizer and
CharacterSet parsing tools. But that is left for later work.
}
size_t openESITags (0);
- //erring on the safe side. Probably rawBuf would be ok too
- char const *currentPos = content.termedBuf();
- size_t remainingCount = content.size();
+ // TODO: convert to Tokenizer parse
+ // erring on the safe side for now. Probably rawContent would be ok too
+ // note that operations below do *X='\0' ... altering the 'const' buffer content.
+ char const *currentPos = content.c_str();
+ SBuf::size_type remainingCount = content.length();
char const *tag = NULL;
while ((tag = findTag(currentPos, remainingCount))) {
/* inherits from */
#include "esi/Parser.h"
-/* for String variables */
+#include "SBuf.h"
#include "SquidString.h"
/**
ESIParserClient *theClient;
String error;
/* cheap n dirty - buffer it all */
- String content;
+ SBuf content;
/* TODO: make a class of this type code */
ESITAG_t lastTag;
};