Parsing of error pages & icmp in digital unix (squid 1.2beta20)

From: Pedro Ribeiro <pribeiro@dont-contact.us>
Date: Mon, 18 May 1998 10:43:32 +0100

Subject #1:

I'v found a problem in the parsing code of error pages, my personalized
error pages include some html tables with a with percentage parameters, when
squid is parsing that pages it substitutes that parameters with UNKNOWN

the situation is:

Original html code:

...
<td width="100%" bgcolor="#0000FF">
...

The resulting code (after parsed by squid).

...
<td width="100%UNKNOWN% bgcolor="#0000FF">
...

Taking a look to the code in errorpage.c, i'v seen that this problem is
workarounded in the source page by putting two %% whenever we want to be a
real % but because all the html editors i'v seen don't make this by default,
i'v made a small patch to fix this behaviour in this specific case, but my
sugestion is that instead of using as metachar '%' that can appear in html
pages very often, some other char or char sequence be used.

here goes my patch:

*** errorpage.c.orig Mon May 18 08:47:00 1998
--- errorpage.c Mon May 18 09:33:13 1998
***************
*** 484,490 ****
--- 484,493 ----
        p = "%";
        break;
      default:
+ if(isalpha(token))
                p = "%UNKNOWN%";
+ else
+ snprintf(buf, CVT_BUF_SZ, "%%%c", token);
        break;
      }
      assert(p != NULL);

Next subject #2:

I would like to contribute to the squid faq with a problem that was appening
to my squid in Digital Unix 4.0D and i solved today.

>Question:
>
>I'v tried unsuccessfully using the icmp code in Digital Unix 4.0D, even
with the "pinger" executable beeing >suid, when squid starts it always
reports:
>
>1998/05/18 08:51:00| pingerOpen: icmp_sock: (13) Permission denied
>
>Answer:
>
> You must make the owner of the process to be "root", only with the suid
flag doesnt work in Digital Unix

Thank to all the dev. team.

[]---------------------------------------------------------------[]
  Pedro Ribeiro
  Online: http://www.cc.isel.pt/Pessoais/PedroRibeiro
  IRC(PTnet) Nick: PAntMaR
  e-Mail: Personal: pribeiro@cc.isel.pt
          Admin: admin@isel.pt
          Pager: pribeiro.pager@cc.isel.pt
          (PS: Short, NO MS Trash, plain text only, NO MIME Stuff)
  Tel: +351-1-8317128 / Fax: +351-1-8317171
[]---------------------------------------------------------------[]
Received on Mon May 18 1998 - 02:46:48 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:40:13 MST