--------------------- PatchSet 97 Date: 2002/11/01 01:52:50 Author: rbcollins Branch: esi Tag: (none) Log: Add error files, and more render work Members: errors/Bulgarian/ERR_ESI:1.1->1.1.2.1 errors/Catalan/ERR_ESI:1.1->1.1.2.1 errors/Czech/ERR_ESI:1.1->1.1.2.1 errors/Danish/ERR_ESI:1.1->1.1.2.1 errors/Dutch/ERR_ESI:1.1->1.1.2.1 errors/English/ERR_ESI:1.1->1.1.2.1 errors/Estonian/ERR_ESI:1.1->1.1.2.1 errors/Finnish/ERR_ESI:1.1->1.1.2.1 errors/French/ERR_ESI:1.1->1.1.2.1 errors/German/ERR_ESI:1.1->1.1.2.1 errors/Hebrew/ERR_ESI:1.1->1.1.2.1 errors/Hungarian/ERR_ESI:1.1->1.1.2.1 errors/Italian/ERR_ESI:1.1->1.1.2.1 errors/Japanese/ERR_ESI:1.1->1.1.2.1 errors/Korean/ERR_ESI:1.1->1.1.2.1 errors/Polish/ERR_ESI:1.1->1.1.2.1 errors/Portuguese/ERR_ESI:1.1->1.1.2.1 errors/Romanian/ERR_ESI:1.1->1.1.2.1 errors/Russian-1251/ERR_ESI:1.1->1.1.2.1 errors/Russian-koi8-r/ERR_ESI:1.1->1.1.2.1 errors/Serbian/ERR_ESI:1.1->1.1.2.1 errors/Simplify_Chinese/ERR_ESI:1.1->1.1.2.1 errors/Slovak/ERR_ESI:1.1->1.1.2.1 errors/Spanish/ERR_ESI:1.1->1.1.2.1 errors/Swedish/ERR_ESI:1.1->1.1.2.1 errors/Traditional_Chinese/ERR_ESI:1.1->1.1.2.1 errors/Turkish/ERR_ESI:1.1->1.1.2.1 src/ESI.cc:1.1.2.6->1.1.2.7 --- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Bulgarian/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + +
++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Catalan/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Czech/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Danish/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Dutch/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/English/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,28 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w. --- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Estonian/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + +
++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Finnish/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/French/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/German/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Hebrew/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Hungarian/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Italian/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Japanese/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Korean/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Polish/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Portuguese/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Romanian/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Russian-1251/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Russian-koi8-r/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Serbian/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Simplify_Chinese/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Slovak/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Spanish/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Swedish/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Traditional_Chinese/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
--- /dev/null Wed Feb 14 12:13:05 2007 +++ squid3/errors/Turkish/ERR_ESI Wed Feb 14 12:13:49 2007 @@ -0,0 +1,29 @@ + + ++While trying to retrieve the URL: +%U +
+The following error was encountered: +
+ESI Processing failed. ++ +
+The ESI processor returned: +
+%Z ++ +
+This means that: +
+ The surrogate was not able to process the ESI template. Please report this error to the webmaster. ++
Your webmaster is %w.
+This page is in english because a translation has not been made. If you are able to, please create a translation and contact the squid project to get it included.
Index: squid3/src/ESI.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ESI.cc,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid3/src/ESI.cc 1 Nov 2002 01:15:12 -0000 1.1.2.6 +++ squid3/src/ESI.cc 1 Nov 2002 01:55:07 -0000 1.1.2.7 @@ -1,6 +1,6 @@ /* - * $Id: ESI.cc,v 1.1.2.6 2002/11/01 01:15:12 rbcollins Exp $ + * $Id: ESI.cc,v 1.1.2.7 2002/11/01 01:55:07 rbcollins Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -363,6 +363,12 @@ /* esiChoose */ struct esiChoose : public esiElement { + void *operator new (size_t byteCount); + void operator delete (void *address); + void deleteSelf(); + + esiChoose(); + void render(esiSegment *); esiElement ** elements; /* unprocessed nodes */ int allocedcount; size_t allocedsize; @@ -3006,30 +3012,58 @@ cbdataFree (thisNode->otherwise); } +void * +esiChoose::operator new(size_t byteCount) +{ + assert (byteCount == sizeof (esiChoose)); + void *rv; + CBDATA_INIT_TYPE_FREECB(esiChoose, esiChooseFree); + rv = (void *)cbdataAlloc (esiChoose); + return rv; +} + +void +esiChoose::operator delete (void *address) +{ + cbdataFree ((esiChoose *)address); +} + +void +esiChoose::deleteSelf() +{ + delete this; +} + esiElement * esiChooseNew () { - esiChoose *rv; - CBDATA_INIT_TYPE_FREECB(esiChoose, esiChooseFree); - rv = cbdataAlloc (esiChoose); - rv->Vptr = &_esiChoose; - rv->elements = NULL; - rv->chosenelement = -1; - return (esiElement *)rv; + return new esiChoose; +} + +esiChoose::esiChoose() +{ + Vptr = &_esiChoose; + elements = NULL; + chosenelement = -1; } void esiChooseRender (void *data, esiSegment *output) { + ((esiChoose *)data)->render(output); +} + +void +esiChoose::render(esiSegment *output) +{ /* append all processed elements, and trim processed and rendered elements */ - esiChoose *thisNode = (esiChoose *)data; assert (output->next == NULL); - assert (thisNode->elementcount || thisNode->otherwise); + assert (elementcount || otherwise); debug (86,5)("esiChooseRender: rendering\n"); - if (thisNode->chosenelement >= 0) - RENDER (thisNode->elements[thisNode->chosenelement], output); - else if (thisNode->otherwise) { - RENDER (thisNode->otherwise, output); + if (chosenelement >= 0) + RENDER (elements[chosenelement], output); + else if (otherwise) { + RENDER (otherwise, output); } }