diff -rupN squid-2.5.STABLE4/CONTRIBUTORS squid-2.5.STABLE5/CONTRIBUTORS
--- squid-2.5.STABLE4/CONTRIBUTORS Sun Jul 21 17:28:03 2002
+++ squid-2.5.STABLE5/CONTRIBUTORS Wed Feb 18 06:35:30 2004
@@ -88,5 +88,6 @@ and ideas to make this software availabl
Ian Castle This has been removed - starting with Squid-2.4 this directive have had no effect and has now been fully removed to avoid confusion. This has been removed - it is not referenced anywhere in the source code. This has been removed - it is not referenced anywhere in the source code. New directive to enable an alternative way of referring to icons in FTP directory listings etc. New acl type to match the login component of Internet style URLs (protocol://user:password@host/path/to/file)Squid 2.5 release notes
-Squid Developers
$Id: release-2.5.html,v 1.1.2.20 2003/09/15 00:35:55 hno Exp $
+Squid Developers
$Id: release-2.5.html,v 1.1.2.30 2004/02/29 22:24:27 hno Exp $
This document contains the release notes for version 2.5 of Squid.
Squid is a WWW Cache application developed by the National Laboratory
@@ -130,6 +130,8 @@ exacly where you want to have them in yo
There is a few known issues and limitations in this version of Squid which we hope to correct in a later release
always/never_direct and NTLM authentication
-cache_peer_access fails with NTLM authentication
-deny_info only works for http_access, not for the acls listen in http_reply_access
- -tcp_outgoing_address using an ident ACL does not work
-Negative cached 404 replies with VARY header never matches
-acl max_user_ip and multiple authentication schemes
-squid -F is starting server sockets to early
-wb_auth fails on TRU64 and probably other 64 bit platforms
-delay_pools stops working on -k reconfigure
-does not handle swap.state corruption properly
-Vary: * does not work
-unstable if runs out of disk space
-diskd may appear slow on low loads
+assertion failed: cbdata.c:249: "c->locks > 0" when using diskd
+ntlm auth_user_hash_pointer memory leak if challenge reuses are enabled
+ +users going above their allowed IP count no longer logged in cache.log
+tcp_outgoing_address using an ident ACL does not work
+Negative cached 404 replies with VARY header never matches
+acl max_user_ip and multiple authentication schemes
+miss_access fails on "slow" acl types such as dst.
+squid -F is starting server sockets to early
+wb_auth fails on TRU64 and probably other 64 bit platforms
+delay_pools stops working on -k reconfigure
+does not handle swap.state corruption properly
+Vary: * does not work
+unstable if runs out of disk space
+diskd may appear slow on low loads
+
diff -rupN squid-2.5.STABLE4/errors/German/README squid-2.5.STABLE5/errors/German/README
--- squid-2.5.STABLE4/errors/German/README Wed Dec 31 17:00:00 1969
+++ squid-2.5.STABLE5/errors/German/README Fri Apr 24 12:35:59 1998
@@ -0,0 +1,3 @@
+Thank you to Bernd P. Ziller
-Priėjimo kontrolės konfiguracija šiuo metu neleidžia atsiųsti jūsų
-nurodyto puslapio. Jei manote, kad tai yra neteisinga, galite susisiekti
+Priėjimo kontrolės konfigūracija šiuo metu neleidžia atsiųsti jūsų
+nurodyto puslapio. Jei manote, kad tai yra neteisinga, galite susisiekti
su jūsų Interneto paslaugų tiekėju.
-Bandant atsiųsti puslapį:
-%U
-
-Gautas klaidos pranešimas:
-
+Bandant atsiųsti puslapį:
+%U
+
+Gautas klaidos pranešimas:
+KLAIDA
Priėjimas prie kešo uždraustas
-
+
Atsiprašau, bet jūs šiuo metu negalite vykdyti užklausimo: +
Atsiprašome, bet jūs šiuo metu negalite vykdyti užklausos:
%Uper šį serverį, kol jūs neprisistatysite.
Jums reikia Netscape v2.0 ar naujesnio, arba Microsoft Internet -Explorer 3.0 ar naujesnio, arba kitos HTTP/1.1 suprantančios peržiūros -programos. Prašau susisiekti su proxy +Explorer 3.0 ar naujesnio, arba kitos HTTP/1.1 suprantančios peržiūros +programos. Prašome susisiekti su proxy administratoriumi, jei jums kils sunkumai prisistatant arba -pakeisti savo slaptažodį. +pakeisti savo slaptažodį.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_CACHE_MGR_ACCESS_DENIED squid-2.5.STABLE5/errors/Lithuanian/ERR_CACHE_MGR_ACCESS_DENIED --- squid-2.5.STABLE4/errors/Lithuanian/ERR_CACHE_MGR_ACCESS_DENIED Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_CACHE_MGR_ACCESS_DENIED Thu Nov 6 08:33:26 2003 @@ -1,5 +1,5 @@ - +Atsiprašiau, bet jūs negalite vykdyti užklausimo: +
Atsiprašome, bet jūs negalite vykdyti užklausos:
%Ušiam kešo menedžeriui, kol jūs neprisistatysite. -
-Jums reikia Netscape v2.0 ar naujesnio, arba Microsoft Internet -Explorer 3.0 ar naujesnio, arba kitos HTTP/1.1 suprantančios peržiūros -programos. Prašau susisiekti su administratoriumi, +
+Jums reikia Netscape v2.0 ar naujesnio, arba Microsoft Internet +Explorer 3.0 ar naujesnio, arba kitos HTTP/1.1 suprantančios peržiūros +programos. Prašome susisiekti su administratoriumi, jei jums iškilo problemos prisistatant arba, jei jūs esate -administratorius, perskaitykite Squid documentaciją dėl kešo menedžerio -interfeiso ir patikrinkite kešo žurnalą dėl detalesnių pranešimų apie -klaidas. +administratorius, perskaitykite Squid documentaciją dėl kešo menedžerio +interfeiso ir patikrinkite kešo žurnalą dėl detalesnių pranešimų apie +klaidas.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_CANNOT_FORWARD squid-2.5.STABLE5/errors/Lithuanian/ERR_CANNOT_FORWARD --- squid-2.5.STABLE4/errors/Lithuanian/ERR_CANNOT_FORWARD Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_CANNOT_FORWARD Thu Nov 6 08:33:26 2003 @@ -1,25 +1,25 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
-Užklausimas negali būti persiųstas į pagrindinį serverį arba kurį nors +Užklausa negali būti persiųsta į pagrindinį serverį arba kurį nors pagalbinį proxy serverį. Pagrindinės tokios klaidos priežastys yra šios:
-Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
%E
-Nurodytas serveris arba tinklas yra atjungtas. -Pabandykite vykdyti užklausimą vėliau. +Nurodytas serveris arba tinklas yra atjungtas. +Pabandykite vykdyti užklausą vėliau.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_DNS_FAIL squid-2.5.STABLE5/errors/Lithuanian/ERR_DNS_FAIL --- squid-2.5.STABLE4/errors/Lithuanian/ERR_DNS_FAIL Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_DNS_FAIL Thu Nov 6 08:33:27 2003 @@ -1,17 +1,17 @@ - +-Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
Neįmanoma nustatyti %H serverio IP adreso@@ -30,4 +30,3 @@ Tai reiškia, kad: Patikrinkite, ar teisingai įvedėte adresą. - diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_FORWARDING_DENIED squid-2.5.STABLE5/errors/Lithuanian/ERR_FORWARDING_DENIED --- squid-2.5.STABLE4/errors/Lithuanian/ERR_FORWARDING_DENIED Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_FORWARDING_DENIED Thu Nov 6 08:33:27 2003 @@ -1,17 +1,17 @@ - -
-Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
-Šis kešas negali perkelti jūsų užklausimo, kadangi jis bando sukurti +Šis kešas negali perkelti jūsų užklausos, kadangi ji bando sukurti sibling tipo ryšius. Gal būt klientas %i yra kešas, kuris klaidingai -sukonfiguruotas. +sukonfigūruotas.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_DISABLED squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_DISABLED --- squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_DISABLED Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_DISABLED Thu Nov 6 08:33:27 2003 @@ -1,17 +1,17 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
Įvyko FTP protokolo klaida -bandant atsiusti puslapį: +bandant atsiųsti puslapį: %U
Squid nusiuntė šią FTP komandą:
-ir gavo šį atsakymą: +ir gavo šį atsakymą:%f
%F
-%g
-Tai gali būti sąlygota FTP adreso su pilnu keliu (kuris neatitinka -RFC 1738 standarto). Jei taip atsitiko, tada duomenys gali būti -rasti %B adresu.
- diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_FORBIDDEN squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_FORBIDDEN --- squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_FORBIDDEN Wed Dec 31 17:00:00 1969 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_FORBIDDEN Thu Nov 6 08:33:27 2003 @@ -0,0 +1,18 @@ + + ++Nepavyko FTP prisistatymas bandant atsiųsti puslapį: +%U +
+Squid nusiuntė šią FTP komandą: +
+ir gavo šį atsakymą: +%f
+%F
+ diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_NOT_FOUND squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_NOT_FOUND --- squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_NOT_FOUND Wed Dec 31 17:00:00 1969 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_NOT_FOUND Thu Nov 6 08:33:27 2003 @@ -0,0 +1,22 @@ + + +%g
+Nepavyko atsiųsti puslapio: +%U +
+Squid nusiuntė šią FTP komandą: +
+ir gavo šį atsakymą: +%f
+%F
+%g
+Tai gali būti sąlygota FTP adreso su pilnu keliu (kuris neatitinka +RFC 1738 standarto). Jei taip atsitiko, tada duomenys gali būti +rasti %B adresu. +
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_PUT_CREATED squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_PUT_CREATED --- squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_PUT_CREATED Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_PUT_CREATED Thu Nov 6 08:33:28 2003 @@ -1,5 +1,5 @@ - +- diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_PUT_ERROR squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_PUT_ERROR --- squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_PUT_ERROR Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_PUT_ERROR Thu Nov 6 08:33:28 2003 @@ -1,5 +1,5 @@ - +
- diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_UNAVAILABLE squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_UNAVAILABLE --- squid-2.5.STABLE4/errors/Lithuanian/ERR_FTP_UNAVAILABLE Wed Dec 31 17:00:00 1969 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_FTP_UNAVAILABLE Thu Nov 6 08:33:28 2003 @@ -0,0 +1,18 @@ + + +
+FTP serveris buvo užimtas bandant atsiųsti puslapį: +%U +
+Squid nusiuntė šią FTP komandą: +
+ir gavo šį atsakymą: +%f
+%F
+ diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_INVALID_REQ squid-2.5.STABLE5/errors/Lithuanian/ERR_INVALID_REQ --- squid-2.5.STABLE4/errors/Lithuanian/ERR_INVALID_REQ Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_INVALID_REQ Thu Feb 12 10:22:23 2004 @@ -1,13 +1,13 @@ - -%g
-Bandant įvykdyti užklausimą: +Bandant įvykdyti užklausą:
%R@@ -16,18 +16,18 @@ Gautas klaidos pranešimas:
-Dalis HTTP užklausimo yra klaidinga. Galimos problemos: +Dalis HTTP užklausos yra klaidinga. Galimos problemos:
-Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
-Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
-Squid nutraukė užklausimą, kadangi jis viršijo maksimalią +Squid nutraukė užklausą, kadangi ji viršijo maksimalią ryšio trukmės reikšmę.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_NO_RELAY squid-2.5.STABLE5/errors/Lithuanian/ERR_NO_RELAY --- squid-2.5.STABLE4/errors/Lithuanian/ERR_NO_RELAY Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_NO_RELAY Thu Nov 6 08:33:29 2003 @@ -1,17 +1,17 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
-WAIS Relay serveris yra nenurodytas šiame proxy serveryje! +WAIS Relay serveris yra nenurodytas šiame proxy serveryje! Šauk ant (tik ne į) admino.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_ONLY_IF_CACHED_MISS squid-2.5.STABLE5/errors/Lithuanian/ERR_ONLY_IF_CACHED_MISS --- squid-2.5.STABLE4/errors/Lithuanian/ERR_ONLY_IF_CACHED_MISS Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_ONLY_IF_CACHED_MISS Thu Nov 6 08:33:29 2003 @@ -1,17 +1,17 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
only-if-cached
@@ -20,7 +20,7 @@ komanda buvo nurodyta.
-Jūs davėte užklausimą su only-if-cached
proxy kontrolės
+Jūs davėte užklausą su only-if-cached
proxy kontrolės
komanda. Dokumentas nerastas serveryje, arba jis pareikalavo
patvirtinimo uždrausto only-if-cached
komandos.
-Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
%E
-Įvyko klaida skaitant duomenis tinkle. -Prašau pakartoti savo užklausimą. +Įvyko klaida skaitant duomenis tinkle. +Prašome pakartoti savo užklausą.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_READ_TIMEOUT squid-2.5.STABLE5/errors/Lithuanian/ERR_READ_TIMEOUT --- squid-2.5.STABLE4/errors/Lithuanian/ERR_READ_TIMEOUT Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_READ_TIMEOUT Thu Nov 6 08:33:29 2003 @@ -1,17 +1,17 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
%E
-Klaida įvyko laukiant duomenų atsiuntimo iš tinklo. Tinklas arba serveris -gali būti atjungtas arba perkrautas. Prašau pakartoti jūsų užklausimą. +Klaida įvyko laukiant duomenų atsiuntimo iš tinklo. Tinklas arba serveris +gali būti atjungtas arba perkrautas. Prašome pakartoti užklausą.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_SHUTTING_DOWN squid-2.5.STABLE5/errors/Lithuanian/ERR_SHUTTING_DOWN --- squid-2.5.STABLE4/errors/Lithuanian/ERR_SHUTTING_DOWN Wed Dec 31 17:00:00 1969 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_SHUTTING_DOWN Thu Nov 6 08:33:29 2003 @@ -0,0 +1,17 @@ + + ++Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
+Šiuo metu kešas yra išjungiamas ir negali jūsų aptarnauti. +Prašome pakartoti užklausą vėliau. +
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_SOCKET_FAILURE squid-2.5.STABLE5/errors/Lithuanian/ERR_SOCKET_FAILURE --- squid-2.5.STABLE4/errors/Lithuanian/ERR_SOCKET_FAILURE Tue Aug 13 06:33:41 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_SOCKET_FAILURE Thu Nov 6 08:33:29 2003 @@ -1,17 +1,17 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
Squid negalėjo sukurti TCP socket, greičiausiai dėl per didelio apkrovimo. -Prašau pakartoti savo užklausimą. +Prašome pakartoti savo užklausą.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_TOO_BIG squid-2.5.STABLE5/errors/Lithuanian/ERR_TOO_BIG --- squid-2.5.STABLE4/errors/Lithuanian/ERR_TOO_BIG Wed Dec 31 17:00:00 1969 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_TOO_BIG Thu Nov 6 08:33:30 2003 @@ -0,0 +1,27 @@ + + ++Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
+Jei jūs vykdote POST arba PUT užklausą, jūsų užklausos dydis +(tai, ką jūs bandote nusiųsti) yra per didelis. Jei jūs vykdote +GET užklausą, atsakymo dydis (tai, ką jūs bandote atsisiųsti) +yra per didelis. Šie apribojimai yra uždėti jūsų Interneto +tiekėjo. Prašome kreiptis į savo administratorių arba Interneto +tiekėją, jei manote, kad tai neteisinga. +
-Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
Squid palaiko ne visus užklausos metodus daliai protokolų. -Pavyzdžiui, jūs negalite vykdyti POST Gopher tipo užklausime. +Pavyzdžiui, jūs negalite vykdyti POST Gopher tipo užklausoje.
- diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_URN_RESOLVE squid-2.5.STABLE5/errors/Lithuanian/ERR_URN_RESOLVE --- squid-2.5.STABLE4/errors/Lithuanian/ERR_URN_RESOLVE Tue Aug 13 06:33:42 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_URN_RESOLVE Thu Nov 6 08:33:30 2003 @@ -1,5 +1,5 @@ - +-Mielieji, siūlau daug nesitikėti iš URNu %T :) +Mielieji, siūlau daug nesitikėti iš URNų %T :)
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_WRITE_ERROR squid-2.5.STABLE5/errors/Lithuanian/ERR_WRITE_ERROR --- squid-2.5.STABLE4/errors/Lithuanian/ERR_WRITE_ERROR Tue Aug 13 06:33:42 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_WRITE_ERROR Thu Nov 6 08:33:30 2003 @@ -1,17 +1,17 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
%E
-Įvyko klaida bandant rašyti tinkle. -Prašau pakartoti savo užklausimą. +Įvyko klaida bandant rašyti tinkle. +Prašome pakartoti savo užklausą.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/ERR_ZERO_SIZE_OBJECT squid-2.5.STABLE5/errors/Lithuanian/ERR_ZERO_SIZE_OBJECT --- squid-2.5.STABLE4/errors/Lithuanian/ERR_ZERO_SIZE_OBJECT Tue Aug 13 06:33:42 2002 +++ squid-2.5.STABLE5/errors/Lithuanian/ERR_ZERO_SIZE_OBJECT Thu Nov 6 08:33:30 2003 @@ -1,17 +1,17 @@ - --Bandant atsiųsti puslapį: -%U -
-Gautas klaidos pranešimas: -
+Bandant atsiųsti puslapį: +%U +
+Gautas klaidos pranešimas: +
-Squid negavo jokių duomenų šiam užklausimui. +Squid negavo jokių duomenų šiai užklausai.
diff -rupN squid-2.5.STABLE4/errors/Lithuanian/README squid-2.5.STABLE5/errors/Lithuanian/README --- squid-2.5.STABLE4/errors/Lithuanian/README Wed Dec 31 17:00:00 1969 +++ squid-2.5.STABLE5/errors/Lithuanian/README Thu Nov 6 08:33:30 2003 @@ -0,0 +1,2 @@ +Thank you to "DVM"-Ķąńņšīéźą źīķņšīė’ äīńņóļą ķå äąåņ āīēģīęķīńņč āūļīėķčņü Āąų +Ķąńņšīéźą źīķņšīė’ äīńņóļą ķå äąøņ āīēģīęķīńņč āūļīėķčņü Āąų ēąļšīń ā ķąńņī’łåå āšåģ’. Ļīęąėóéńņą, ńā’ęčņåńü ń Āąųčģ ļīńņąāłčźīģ óńėóć Čķņåšķåņ, åńėč Āū ń÷čņąåņå żņī ķåļšąāčėüķūģ.
Āī āšåģ’ äīńņąāźč URL: @@ -15,14 +15,14 @@
Čēāčķčņå, Āū ķå ģīęåņå ēąļšīńčņü:
%U-čē żņīćī źżųą äī ņåõ ļīš, ļīźą ķå ļšīéäåņå ąóņåķņčōčźąöčž. +čē żņīćī źżųą äī ņåõ ļīš, ļīźą ķå ļšīéäøņå ąóņåķņčōčźąöčž.
diff -rupN squid-2.5.STABLE4/errors/Russian-1251/ERR_CACHE_MGR_ACCESS_DENIED squid-2.5.STABLE5/errors/Russian-1251/ERR_CACHE_MGR_ACCESS_DENIED --- squid-2.5.STABLE4/errors/Russian-1251/ERR_CACHE_MGR_ACCESS_DENIED Wed Aug 28 15:08:10 2002 +++ squid-2.5.STABLE5/errors/Russian-1251/ERR_CACHE_MGR_ACCESS_DENIED Sun Dec 21 08:15:06 2003 @@ -1,11 +1,11 @@
-Āī āšåģ’ äīńņąāźč URL: @@ -15,14 +15,14 @@
Čēāčķčņå, Āū ķå ģīęåņå ēąļšīńčņü:
%U-čē ńčńņåģū óļšąāėåķč’ źżųą äī ņåõ ļīš, ļīźą ķå ļšīéäåņå ąóņåķņčōčźąöčž. +čē ńčńņåģū óļšąāėåķč’ źżųą äī ņåõ ļīš, ļīźą ķå ļšīéäøņå ąóņåķņčōčźąöčž.
diff -rupN squid-2.5.STABLE4/errors/Russian-1251/ERR_CONNECT_FAIL squid-2.5.STABLE5/errors/Russian-1251/ERR_CONNECT_FAIL --- squid-2.5.STABLE4/errors/Russian-1251/ERR_CONNECT_FAIL Wed Aug 28 15:08:10 2002 +++ squid-2.5.STABLE5/errors/Russian-1251/ERR_CONNECT_FAIL Sun Dec 21 08:15:07 2003 @@ -23,5 +23,5 @@
%E
-Óäąėåķķūé ńåšāåš ėčįī ńåņü ķå īņāå÷ąžņ. Ļīęąėóéńņą, ļīāņīščņå ēąļšīń. +Óäąėøķķūé ńåšāåš ėčįī ńåņü ķå īņāå÷ąžņ. Ļīęąėóéńņą, ļīāņīščņå ēąļšīń.
diff -rupN squid-2.5.STABLE4/errors/Russian-1251/ERR_FTP_DISABLED squid-2.5.STABLE5/errors/Russian-1251/ERR_FTP_DISABLED --- squid-2.5.STABLE4/errors/Russian-1251/ERR_FTP_DISABLED Wed Aug 28 15:08:10 2002 +++ squid-2.5.STABLE5/errors/Russian-1251/ERR_FTP_DISABLED Sun Dec 21 08:15:07 2003 @@ -14,7 +14,7 @@-Żņī ģīęåņ įūņü āūēāąķī ąäšåńīģ ń ąįńīėžņķūģ ļóņåģ (źīņīšūé ķå +Żņī ģīęåņ įūņü āūēāąķī ąäšåńīģ ń ąįńīėžņķūģ ļóņøģ (źīņīšūé ķå ńīīņāåņńņāóåņ ńņąķäąšņó RFC 1738). Ā żņīģ ńėó÷ąå, ōąéė ģīęåņ įūņü ķąéäåķ ļī ąäšåńó %B.
diff -rupN squid-2.5.STABLE4/errors/Russian-1251/ERR_FTP_PUT_MODIFIED squid-2.5.STABLE5/errors/Russian-1251/ERR_FTP_PUT_MODIFIED --- squid-2.5.STABLE4/errors/Russian-1251/ERR_FTP_PUT_MODIFIED Wed Aug 28 15:08:10 2002 +++ squid-2.5.STABLE5/errors/Russian-1251/ERR_FTP_PUT_MODIFIED Sun Dec 21 08:15:07 2003 @@ -1,10 +1,10 @@ -diff -rupN squid-2.5.STABLE4/errors/Russian-1251/ERR_INVALID_URL squid-2.5.STABLE5/errors/Russian-1251/ERR_INVALID_URL --- squid-2.5.STABLE4/errors/Russian-1251/ERR_INVALID_URL Wed Aug 28 15:08:10 2002 +++ squid-2.5.STABLE5/errors/Russian-1251/ERR_INVALID_URL Sun Dec 21 08:15:07 2003 @@ -25,6 +25,6 @@ ļīõīęčé)
-Äė’ żņīćī źżųą ķå īļšåäåėåķ ńåšāåš WAIS Relay. +Äė’ żņīćī źżųą ķå īļšåäåėøķ ńåšāåš WAIS Relay. Ńīīįłčņå ąäģčķčńņšąņīšó.
diff -rupN squid-2.5.STABLE4/errors/Russian-1251/ERR_ONLY_IF_CACHED_MISS squid-2.5.STABLE5/errors/Russian-1251/ERR_ONLY_IF_CACHED_MISS --- squid-2.5.STABLE4/errors/Russian-1251/ERR_ONLY_IF_CACHED_MISS Wed Aug 28 15:08:10 2002 +++ squid-2.5.STABLE5/errors/Russian-1251/ERR_ONLY_IF_CACHED_MISS Sun Dec 21 08:15:07 2003 @@ -22,5 +22,5 @@
Āū ļīńėąėč ēąļšīń ń äčšåźņčāīé źżų-źīķņšīė’ only-if-cached
.
Īįśåźņ ķå īįķąšóęåķ ā źżųå, ėčįī īķ ņšåįóåņ īįķīāėåķč’,
-ēąļšåłåķķīćī äčšåźņčāīé only-if-cached
.
+ēąļšåłøķķīćī äčšåźņčāīé only-if-cached
.
-īĮÓŌŅĻŹĖĮ ĖĻĪŌŅĻĢŃ ÄĻÓŌÕŠĮ ĪÅ ÄĮÅŌ ×ĻŚĶĻÖĪĻÓŌÉ ×ŁŠĻĢĪÉŌŲ ÷ĮŪ +īĮÓŌŅĻŹĖĮ ĖĻĪŌŅĻĢŃ ÄĻÓŌÕŠĮ ĪÅ ÄĮ£Ō ×ĻŚĶĻÖĪĻÓŌÉ ×ŁŠĻĢĪÉŌŲ ÷ĮŪ ŚĮŠŅĻÓ × ĪĮÓŌĻŃŻÅÅ ×ŅÅĶŃ. šĻÖĮĢÕŹÓŌĮ, Ó×ŃÖÉŌÅÓŲ Ó ÷ĮŪÉĶ ŠĻÓŌĮׯÉĖĻĶ ÕÓĢÕĒ éĪŌÅŅĪÅŌ, ÅÓĢÉ ÷Ł ÓŽÉŌĮÅŌÅ ÜŌĻ ĪÅŠŅĮ×ÉĢŲĪŁĶ.
÷Ļ ×ŅÅĶŃ ÄĻÓŌĮ×ĖÉ URL: @@ -16,14 +16,14 @@
éŚ×ÉĪÉŌÅ, ÷Ł ĪÅ ĶĻÖÅŌÅ ŚĮŠŅĻÓÉŌŲ:
%U-ÉŚ ÜŌĻĒĻ ĖÜŪĮ ÄĻ ŌÅČ ŠĻŅ, ŠĻĖĮ ĪÅ ŠŅĻŹÄÅŌÅ ĮÕŌÅĪŌÉĘÉĖĮĆÉĄ. +ÉŚ ÜŌĻĒĻ ĖÜŪĮ ÄĻ ŌÅČ ŠĻŅ, ŠĻĖĮ ĪÅ ŠŅĻŹÄ£ŌÅ ĮÕŌÅĪŌÉĘÉĖĮĆÉĄ.
diff -rupN squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_CACHE_MGR_ACCESS_DENIED squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_CACHE_MGR_ACCESS_DENIED --- squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_CACHE_MGR_ACCESS_DENIED Mon Aug 26 19:17:23 2002 +++ squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_CACHE_MGR_ACCESS_DENIED Sun Dec 21 08:15:08 2003 @@ -1,12 +1,12 @@
-÷Ļ ×ŅÅĶŃ ÄĻÓŌĮ×ĖÉ URL: @@ -16,14 +16,14 @@
éŚ×ÉĪÉŌÅ, ÷Ł ĪÅ ĶĻÖÅŌÅ ŚĮŠŅĻÓÉŌŲ:
%U-ÉŚ ÓÉÓŌÅĶŁ ÕŠŅĮ×ĢÅĪÉŃ ĖÜŪĮ ÄĻ ŌÅČ ŠĻŅ, ŠĻĖĮ ĪÅ ŠŅĻŹÄÅŌÅ ĮÕŌÅĪŌÉĘÉĖĮĆÉĄ. +ÉŚ ÓÉÓŌÅĶŁ ÕŠŅĮ×ĢÅĪÉŃ ĖÜŪĮ ÄĻ ŌÅČ ŠĻŅ, ŠĻĖĮ ĪÅ ŠŅĻŹÄ£ŌÅ ĮÕŌÅĪŌÉĘÉĖĮĆÉĄ.
diff -rupN squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_CONNECT_FAIL squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_CONNECT_FAIL --- squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_CONNECT_FAIL Mon Aug 26 19:17:23 2002 +++ squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_CONNECT_FAIL Sun Dec 21 08:15:08 2003 @@ -24,5 +24,5 @@
%E
-õÄĮĢÅĪĪŁŹ ÓÅŅ×ÅŅ ĢÉĀĻ ÓÅŌŲ ĪÅ ĻŌ×ÅŽĮĄŌ. šĻÖĮĢÕŹÓŌĮ, ŠĻ×ŌĻŅÉŌÅ ŚĮŠŅĻÓ. +õÄĮĢ£ĪĪŁŹ ÓÅŅ×ÅŅ ĢÉĀĻ ÓÅŌŲ ĪÅ ĻŌ×ÅŽĮĄŌ. šĻÖĮĢÕŹÓŌĮ, ŠĻ×ŌĻŅÉŌÅ ŚĮŠŅĻÓ.
diff -rupN squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_FTP_FAILURE squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_FTP_FAILURE --- squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_FTP_FAILURE Mon Aug 26 19:17:24 2002 +++ squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_FTP_FAILURE Sun Dec 21 08:15:08 2003 @@ -20,7 +20,7 @@ %F-üŌĻ ĶĻÖÅŌ ĀŁŌŲ ×ŁŚ×ĮĪĻ ĮÄŅÅÓĻĶ Ó ĮĀÓĻĢĄŌĪŁĶ ŠÕŌÅĶ (ĖĻŌĻŅŁŹ ĪÅ +üŌĻ ĶĻÖÅŌ ĀŁŌŲ ×ŁŚ×ĮĪĻ ĮÄŅÅÓĻĶ Ó ĮĀÓĻĢĄŌĪŁĶ ŠÕŌ£Ķ (ĖĻŌĻŅŁŹ ĪÅ ÓĻĻŌ×ÅŌÓŌ×ÕÅŌ ÓŌĮĪÄĮŅŌÕ RFC 1738). ÷ ÜŌĻĶ ÓĢÕŽĮÅ, ĘĮŹĢ ĶĻÖÅŌ ĀŁŌŲ ĪĮŹÄÅĪ ŠĻ ĮÄŅÅÓÕ %B.
diff -rupN squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_FTP_PUT_MODIFIED squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_FTP_PUT_MODIFIED --- squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_FTP_PUT_MODIFIED Mon Aug 26 19:17:24 2002 +++ squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_FTP_PUT_MODIFIED Sun Dec 21 08:15:08 2003 @@ -1,11 +1,11 @@ -diff -rupN squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_INVALID_REQ squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_INVALID_REQ --- squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_INVALID_REQ Mon Aug 26 19:17:24 2002 +++ squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_INVALID_REQ Sun Dec 21 08:15:08 2003 @@ -29,6 +29,6 @@
-äĢŃ ÜŌĻĒĻ ĖÜŪĮ ĪÅ ĻŠŅÅÄÅĢÅĪ ÓÅŅ×ÅŅ WAIS Relay. +äĢŃ ÜŌĻĒĻ ĖÜŪĮ ĪÅ ĻŠŅÅÄẠ̊ΠÓÅŅ×ÅŅ WAIS Relay. óĻĻĀŻÉŌÅ ĮÄĶÉĪÉÓŌŅĮŌĻŅÕ.
diff -rupN squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_ONLY_IF_CACHED_MISS squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_ONLY_IF_CACHED_MISS --- squid-2.5.STABLE4/errors/Russian-koi8-r/ERR_ONLY_IF_CACHED_MISS Mon Aug 26 19:17:24 2002 +++ squid-2.5.STABLE5/errors/Russian-koi8-r/ERR_ONLY_IF_CACHED_MISS Sun Dec 21 08:15:09 2003 @@ -23,5 +23,5 @@
÷Ł ŠĻÓĢĮĢÉ ŚĮŠŅĻÓ Ó ÄÉŅÅĖŌÉ×ĻŹ ĖÜŪ-ĖĻĪŌŅĻĢŃ only-if-cached
.
ļĀßÅĖŌ ĪÅ ĻĀĪĮŅÕÖÅĪ × ĖÜŪÅ, ĢÉĀĻ ĻĪ ŌŅÅĀÕÅŌ ĻĀĪĻ×ĢÅĪÉŃ,
-ŚĮŠŅÅŻÅĪĪĻĒĻ ÄÉŅÅĖŌÉ×ĻŹ only-if-cached
.
+ŚĮŠŅÅŻ£ĪĪĻĒĻ ÄÉŅÅĖŌÉ×ĻŹ only-if-cached
.
The Gopher query resulted in a blank response
"); - } else { + } else if (gopherState->HTML_pre) { storeAppendPrintf(e, "\n"); } gopherHTMLFooter(e); @@ -310,8 +310,7 @@ gopherToHTML(GopherStateData * gopherSta gopherHTMLFooter(entry); /* now let start sending stuff to client */ storeBufferFlush(entry); - gopherState->data_in = 1; - + gopherState->HTML_header_added = 1; return; } if (gopherState->conversion == HTML_CSO_PAGE) { @@ -324,8 +323,7 @@ gopherToHTML(GopherStateData * gopherSta gopherHTMLFooter(entry); /* now let start sending stuff to client */ storeBufferFlush(entry); - gopherState->data_in = 1; - + gopherState->HTML_header_added = 1; return; } inbuf[len] = '\0'; @@ -337,6 +335,7 @@ gopherToHTML(GopherStateData * gopherSta gopherHTMLHeader(entry, "Gopher Menu", NULL); strCat(outbuf, ""); gopherState->HTML_header_added = 1; + gopherState->HTML_pre = 1; } while ((pos != NULL) && (pos < inbuf + len)) { @@ -505,7 +504,6 @@ gopherToHTML(GopherStateData * gopherSta } safe_free(escaped_selector); strCat(outbuf, tmpbuf); - gopherState->data_in = 1; } else { memset(line, '\0', TEMP_BUF_SIZE); continue; @@ -543,7 +541,6 @@ gopherToHTML(GopherStateData * gopherSta snprintf(tmpbuf, TEMP_BUF_SIZE, "%s\n", html_quote(result)); } strCat(outbuf, tmpbuf); - gopherState->data_in = 1; break; } else { int code; @@ -571,7 +568,6 @@ gopherToHTML(GopherStateData * gopherSta /* Print the message the server returns */ snprintf(tmpbuf, TEMP_BUF_SIZE, "
", html_quote(result)); strCat(outbuf, tmpbuf); - gopherState->data_in = 1; break; } diff -rupN squid-2.5.STABLE4/src/helper.c squid-2.5.STABLE5/src/helper.c --- squid-2.5.STABLE4/src/helper.c Fri Sep 12 14:30:16 2003 +++ squid-2.5.STABLE5/src/helper.c Mon Feb 9 02:03:49 2004 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.34.2.13 2003/09/12 20:30:16 hno Exp $ + * $Id: helper.c,v 1.34.2.15 2004/02/09 09:03:49 hno Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? @@ -53,9 +53,6 @@ static void helperStatefulKickQueue(stat static void helperRequestFree(helper_request * r); static void helperStatefulRequestFree(helper_stateful_request * r); static void StatefulEnqueue(statefulhelper * hlp, helper_stateful_request * r); -static helper_stateful_request *StatefulServerDequeue(helper_stateful_server * srv); -static void StatefulServerEnqueue(helper_stateful_server * srv, helper_stateful_request * r); -static void helperStatefulServerKickQueue(helper_stateful_server * srv); void helperOpenServers(helper * hlp) @@ -184,12 +181,8 @@ helperStatefulOpenServers(statefulhelper srv = cbdataAlloc(helper_stateful_server); srv->pid = x; srv->flags.alive = 1; - srv->flags.reserved = S_HELPER_FREE; - srv->deferred_requests = 0; - srv->stats.deferbyfunc = 0; - srv->stats.deferbycb = 0; + srv->flags.reserved = 0; srv->stats.submits = 0; - srv->stats.releases = 0; srv->index = k; srv->rfd = rfd; srv->wfd = wfd; @@ -243,14 +236,10 @@ helperSubmit(helper * hlp, const char *b debug(84, 9) ("helperSubmit: %s\n", buf); } -/* lastserver = "server last used as part of a deferred or reserved - * request sequence" - */ void -helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, void *data, helper_stateful_server * lastserver) +helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, void *data, helper_stateful_server * srv) { helper_stateful_request *r = memAllocate(MEM_HELPER_STATEFUL_REQUEST); - helper_stateful_server *srv; if (hlp == NULL) { debug(84, 3) ("helperStatefulSubmit: hlp == NULL\n"); callback(data, 0, NULL); @@ -258,109 +247,50 @@ helperStatefulSubmit(statefulhelper * hl } r->callback = callback; r->data = data; - if (buf != NULL) { + if (buf) r->buf = xstrdup(buf); - r->placeholder = 0; - } else { - r->buf = NULL; - r->placeholder = 1; - } cbdataLock(r->data); - if ((buf != NULL) && lastserver) { - debug(84, 5) ("StatefulSubmit with lastserver %p\n", lastserver); - /* the queue doesn't count for this assert because queued requests - * have already gone through here and been tested. - * It's legal to have deferred_requests == 0 and queue entries - * and status of S_HELPEER_DEFERRED. - * BUT: It's not legal to submit a new request w/lastserver in - * that state. - */ - assert(!(lastserver->deferred_requests == 0 && - lastserver->flags.reserved == S_HELPER_DEFERRED)); - if (lastserver->flags.reserved != S_HELPER_RESERVED) { - lastserver->stats.submits++; - lastserver->deferred_requests--; - } - if (!(lastserver->request)) { - debug(84, 5) ("StatefulSubmit dispatching\n"); - helperStatefulDispatch(lastserver, r); - } else { - debug(84, 5) ("StatefulSubmit queuing\n"); - StatefulServerEnqueue(lastserver, r); - } + if (!srv) + srv = helperStatefulGetServer(hlp); + if (srv) { + debug(84, 5) ("helperStatefulSubmit: sever %p, buf '%s'.\n", srv, buf ? buf : "NULL"); + assert(!srv->request); + assert(!srv->flags.busy); + helperStatefulDispatch(srv, r); } else { - if ((srv = StatefulGetFirstAvailable(hlp))) { - helperStatefulDispatch(srv, r); - } else - StatefulEnqueue(hlp, r); + debug(84, 9) ("helperStatefulSubmit: enqueued, buf '%s'.\n", buf ? buf : "NULL"); + StatefulEnqueue(hlp, r); } - debug(84, 9) ("helperStatefulSubmit: placeholder: '%d', buf '%s'.\n", r->placeholder, buf); } helper_stateful_server * -helperStatefulDefer(statefulhelper * hlp) -/* find and add a deferred request to a server */ +helperStatefulGetServer(statefulhelper * hlp) +/* find a server for this request */ { - dlink_node *n; - helper_stateful_server *srv = NULL, *rv = NULL; + helper_stateful_server *srv = NULL; if (hlp == NULL) { - debug(84, 3) ("helperStatefulDefer: hlp == NULL\n"); + debug(84, 3) ("helperStatefulGetServer: hlp == NULL\n"); return NULL; } - debug(84, 5) ("helperStatefulDefer: Running servers %d.\n", hlp->n_running); + debug(84, 5) ("helperStatefulGetServer: Running servers %d.\n", hlp->n_running); if (hlp->n_running == 0) { - debug(84, 1) ("helperStatefulDefer: No running servers!. \n"); - return NULL; - } - rv = srv = StatefulGetFirstAvailable(hlp); - if (rv == NULL) { - /* - * all currently busy; loop through servers and find server - * with the shortest queue - */ - for (n = hlp->servers.head; n != NULL; n = n->next) { - srv = n->data; - if (srv->flags.reserved == S_HELPER_RESERVED) - continue; - if (!srv->flags.alive) - continue; - if ((hlp->IsAvailable != NULL) && (srv->data != NULL) && - !(hlp->IsAvailable(srv->data))) - continue; - if ((rv != NULL) && (rv->deferred_requests < srv->deferred_requests)) - continue; - rv = srv; - } - } - if (rv == NULL) { - debug(84, 1) ("helperStatefulDefer: None available.\n"); + debug(84, 1) ("helperStatefulGetServer: No running servers!. \n"); return NULL; } - /* consistency check: - * when the deferred count is 0, - * submits + releases == deferbyfunc + deferbycb - * Or in english, when there are no deferred requests, the amount - * we have submitted to the queue or cancelled must equal the amount - * we have said we wanted to be able to submit or cancel - */ - if (rv->deferred_requests == 0) - assert(rv->stats.submits + rv->stats.releases == - rv->stats.deferbyfunc + rv->stats.deferbycb); - - rv->flags.reserved = S_HELPER_DEFERRED; - rv->deferred_requests++; - rv->stats.deferbyfunc++; - return rv; + srv = StatefulGetFirstAvailable(hlp); + if (srv) + srv->flags.reserved = 1; + debug(84, 5) ("helperStatefulGetServer: Returning %p\n", srv); + return srv; } +/* puts this helper forcibly back in the queue. */ void helperStatefulReset(helper_stateful_server * srv) -/* puts this helper back in the queue. the calling app is required to - * manage the state in the helper. - */ { statefulhelper *hlp = srv->parent; helper_stateful_request *r; + debug(84, 5) ("helperStatefulReset: %p\n", srv); r = srv->request; if (r != NULL) { /* reset attempt DURING an outstaning request */ @@ -372,31 +302,26 @@ helperStatefulReset(helper_stateful_serv srv->request = NULL; } srv->flags.busy = 0; - if (srv->queue.head) { - srv->flags.reserved = S_HELPER_DEFERRED; - helperStatefulServerKickQueue(srv); + srv->flags.reserved = 0; + if ((srv->parent->Reset != NULL) && (srv->data)) + srv->parent->Reset(srv->data); + if (srv->flags.shutdown) { + int wfd = srv->wfd; + srv->wfd = -1; + comm_close(wfd); } else { - srv->flags.reserved = S_HELPER_FREE; - if ((srv->parent->OnEmptyQueue != NULL) && (srv->data)) - srv->parent->OnEmptyQueue(srv->data); helperStatefulKickQueue(hlp); } } +/* puts this helper back in the queue. */ void helperStatefulReleaseServer(helper_stateful_server * srv) -/*decrease the number of 'waiting' clients that set the helper to be DEFERRED */ { - srv->stats.releases++; - if (srv->flags.reserved == S_HELPER_DEFERRED) { - assert(srv->deferred_requests); - srv->deferred_requests--; - } - if (!(srv->deferred_requests) && (srv->flags.reserved == S_HELPER_DEFERRED) && !(srv->queue.head)) { - srv->flags.reserved = S_HELPER_FREE; - if ((srv->parent->OnEmptyQueue != NULL) && (srv->data)) - srv->parent->OnEmptyQueue(srv->data); - } + debug(84, 5) ("helperStatefulReleaseServer: %p\n", srv); + assert(!srv->request); + assert(srv->flags.reserved); + helperStatefulReset(srv); } void * @@ -475,12 +400,11 @@ helperStatefulStats(StoreEntry * sentry, storeAppendPrintf(sentry, "avg service time: %d msec\n", hlp->stats.avg_svc_time); storeAppendPrintf(sentry, "\n"); - storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%20s\t%s\t%7s\t%7s\t%7s\n", + storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\n", "#", "FD", "PID", "# Requests", - "# Deferred Requests", "Flags", "Time", "Offset", @@ -488,18 +412,16 @@ helperStatefulStats(StoreEntry * sentry, for (link = hlp->servers.head; link; link = link->next) { srv = link->data; tt = 0.001 * tvSubMsec(srv->dispatch_time, current_time); - storeAppendPrintf(sentry, "%7d\t%7d\t%7d\t%11d\t%20d\t%c%c%c%c%c%c\t%7.3f\t%7d\t%s\n", + storeAppendPrintf(sentry, "%7d\t%7d\t%7d\t%11d\t%c%c%c%c%c\t%7.3f\t%7d\t%s\n", srv->index + 1, srv->rfd, srv->pid, srv->stats.uses, - (int) srv->deferred_requests, srv->flags.alive ? 'A' : ' ', srv->flags.busy ? 'B' : ' ', srv->flags.closing ? 'C' : ' ', - srv->flags.reserved != S_HELPER_FREE ? 'R' : ' ', + srv->flags.reserved ? 'R' : ' ', srv->flags.shutdown ? 'S' : ' ', - srv->request ? (srv->request->placeholder ? 'P' : ' ') : ' ', tt < 0.0 ? 0.0 : tt, (int) srv->offset, srv->request ? log_quote(srv->request->buf) : "(none)"); @@ -570,16 +492,11 @@ helperStatefulShutdown(statefulhelper * hlp->id_name, srv->index + 1); continue; } - if (srv->flags.reserved != S_HELPER_FREE) { + if (srv->flags.reserved) { debug(84, 3) ("helperStatefulShutdown: %s #%d is RESERVED.\n", hlp->id_name, srv->index + 1); continue; } - if (srv->deferred_requests) { - debug(84, 3) ("helperStatefulShutdown: %s #%d has DEFERRED requests.\n", - hlp->id_name, srv->index + 1); - continue; - } srv->flags.closing = 1; wfd = srv->wfd; srv->wfd = -1; @@ -747,11 +664,8 @@ helperHandleRead(int fd, void *data) /* end of reply found */ debug(84, 3) ("helperHandleRead: end of reply found\n"); *t = '\0'; - if (cbdataValid(r->data)) - r->callback(r->data, srv->buf); srv->flags.busy = 0; srv->offset = 0; - helperRequestFree(r); srv->request = NULL; hlp->stats.replies++; srv->answer_time = current_time; @@ -759,11 +673,10 @@ helperHandleRead(int fd, void *data) intAverage(hlp->stats.avg_svc_time, tvSubUsec(srv->dispatch_time, current_time), hlp->stats.replies, REDIRECT_AV_FACTOR); - if (srv->flags.shutdown) { - int wfd = srv->wfd; - srv->wfd = -1; - comm_close(wfd); - } else + if (cbdataValid(r->data)) + r->callback(r->data, srv->buf); + helperRequestFree(r); + if (!srv->flags.shutdown) helperKickQueue(hlp); } else { commSetSelect(srv->rfd, COMM_SELECT_READ, helperHandleRead, srv, 0); @@ -803,68 +716,20 @@ helperStatefulHandleRead(int fd, void *d /* end of reply found */ debug(84, 3) ("helperStatefulHandleRead: end of reply found\n"); *t = '\0'; - if (cbdataValid(r->data)) { - switch ((r->callback(r->data, srv, srv->buf))) { /*if non-zero reserve helper */ - case S_HELPER_UNKNOWN: - fatal("helperStatefulHandleRead: either a non-state aware callback was give to the stateful helper routines, or an uninitialised callback response was recieved.\n"); - break; - case S_HELPER_RELEASE: /* helper finished with */ - if (!srv->deferred_requests && !srv->queue.head) { - srv->flags.reserved = S_HELPER_FREE; - if ((srv->parent->OnEmptyQueue != NULL) && (srv->data)) - srv->parent->OnEmptyQueue(srv->data); - debug(84, 5) ("StatefulHandleRead: releasing %s #%d\n", hlp->id_name, srv->index + 1); - } else { - srv->flags.reserved = S_HELPER_DEFERRED; - debug(84, 5) ("StatefulHandleRead: outstanding deferred requests on %s #%d. reserving for deferred requests.\n", hlp->id_name, srv->index + 1); - } - break; - case S_HELPER_RESERVE: /* 'pin' this helper for the caller */ - if (!srv->queue.head) { - assert(srv->deferred_requests == 0); - srv->flags.reserved = S_HELPER_RESERVED; - debug(84, 5) ("StatefulHandleRead: reserving %s #%d\n", hlp->id_name, srv->index + 1); - } else { - fatal("StatefulHandleRead: Callback routine attempted to reserve a stateful helper with deferred requests. This can lead to deadlock.\n"); - } - break; - case S_HELPER_DEFER: - /* the helper is still needed, but can - * be used for other requests in the meantime. - */ - srv->flags.reserved = S_HELPER_DEFERRED; - srv->deferred_requests++; - srv->stats.deferbycb++; - debug(84, 5) ("StatefulHandleRead: reserving %s #%d for deferred requests.\n", hlp->id_name, srv->index + 1); - break; - default: - fatal("helperStatefulHandleRead: unknown stateful helper callback result.\n"); - } - - } else { - debug(84, 1) ("StatefulHandleRead: no callback data registered\n"); - } srv->flags.busy = 0; srv->offset = 0; - helperStatefulRequestFree(r); srv->request = NULL; hlp->stats.replies++; hlp->stats.avg_svc_time = intAverage(hlp->stats.avg_svc_time, tvSubMsec(srv->dispatch_time, current_time), hlp->stats.replies, REDIRECT_AV_FACTOR); - if (srv->flags.shutdown - && srv->flags.reserved == S_HELPER_FREE - && !srv->deferred_requests) { - int wfd = srv->wfd; - srv->wfd = -1; - comm_close(wfd); + if (cbdataValid(r->data)) { + r->callback(r->data, srv, srv->buf); } else { - if (srv->queue.head) - helperStatefulServerKickQueue(srv); - else - helperStatefulKickQueue(hlp); + debug(84, 1) ("StatefulHandleRead: no callback data registered\n"); } + helperStatefulRequestFree(r); } else { commSetSelect(srv->rfd, COMM_SELECT_READ, helperStatefulHandleRead, srv, 0); } @@ -878,16 +743,20 @@ Enqueue(helper * hlp, helper_request * r hlp->stats.queue_size++; if (hlp->stats.queue_size < hlp->n_running) return; - if (squid_curtime - hlp->last_queue_warn < 600) + if (hlp->stats.queue_size < hlp->n_running) + return; + if (squid_curtime - hlp->last_queue_warn < 30) return; if (shutting_down || reconfiguring) return; hlp->last_queue_warn = squid_curtime; - debug(84, 0) ("WARNING: All %s processes are busy.\n", hlp->id_name); - debug(84, 0) ("WARNING: %d pending requests queued\n", hlp->stats.queue_size); + debug(84, 1) ("WARNING: All %s processes are busy.\n", hlp->id_name); + debug(84, 1) ("WARNING: up to %d pending requests queued\n", hlp->stats.max_queue_size); if (hlp->stats.queue_size > hlp->n_running * 2) - fatalf("Too many queued %s requests", hlp->id_name); - debug(84, 1) ("Consider increasing the number of %s processes in your config file.\n", hlp->id_name); + fatalf("Too many queued %s requests (%d on %d)", hlp->id_name, hlp->stats.queue_size, hlp->n_running); + if (hlp->stats.max_queue_size > 1) + debug(84, 1) ("Consider increasing the number of %s processes to at least %d in your config file.\n", hlp->id_name, hlp->n_running + hlp->stats.max_queue_size); + hlp->stats.max_queue_size = hlp->stats.queue_size; } static void @@ -898,43 +767,22 @@ StatefulEnqueue(statefulhelper * hlp, he hlp->stats.queue_size++; if (hlp->stats.queue_size < hlp->n_running) return; - if (hlp->stats.queue_size > hlp->n_running * 2) - fatalf("Too many queued %s requests", hlp->id_name); - if (squid_curtime - hlp->last_queue_warn < 600) + if (hlp->stats.queue_size > hlp->stats.max_queue_size) + hlp->stats.max_queue_size = hlp->stats.queue_size; + if (hlp->stats.queue_size > hlp->n_running * 5) + fatalf("Too many queued %s requests (%d on %d)", hlp->id_name, hlp->stats.queue_size, hlp->n_running); + if (squid_curtime - hlp->last_queue_warn < 30) return; if (shutting_down || reconfiguring) return; hlp->last_queue_warn = squid_curtime; - debug(84, 0) ("WARNING: All %s processes are busy.\n", hlp->id_name); - debug(84, 0) ("WARNING: %d pending requests queued\n", hlp->stats.queue_size); - debug(84, 1) ("Consider increasing the number of %s processes in your config file.\n", hlp->id_name); -} - -static void -StatefulServerEnqueue(helper_stateful_server * srv, helper_stateful_request * r) -{ - dlink_node *link = memAllocate(MEM_DLINK_NODE); - dlinkAddTail(r, link, &srv->queue); -/* TODO: warning if the queue on this server is more than X - * We don't check the queue size at the moment, because - * requests hitting here are deferrable - */ -/* hlp->stats.queue_size++; - * if (hlp->stats.queue_size < hlp->n_running) - * return; - * if (squid_curtime - hlp->last_queue_warn < 600) - * return; - * if (shutting_down || reconfiguring) - * return; - * hlp->last_queue_warn = squid_curtime; - * debug(84, 0) ("WARNING: All %s processes are busy.\n", hlp->id_name); - * debug(84, 0) ("WARNING: %d pending requests queued\n", hlp->stats.queue_size); - * if (hlp->stats.queue_size > hlp->n_running * 2) - * fatalf("Too many queued %s requests", hlp->id_name); - * debug(84, 1) ("Consider increasing the number of %s processes in your config file.\n", hlp->id_name); */ + debug(84, 1) ("WARNING: All %s processes are busy.\n", hlp->id_name); + debug(84, 1) ("WARNING: up to %d pending requests queued\n", hlp->stats.max_queue_size); + if (hlp->stats.max_queue_size > 1) + debug(84, 1) ("Consider increasing the number of %s processes to at least %d in your config file.\n", hlp->id_name, hlp->n_running + hlp->stats.max_queue_size); + hlp->stats.max_queue_size = hlp->stats.queue_size; } - static helper_request * Dequeue(helper * hlp) { @@ -950,19 +798,6 @@ Dequeue(helper * hlp) } static helper_stateful_request * -StatefulServerDequeue(helper_stateful_server * srv) -{ - dlink_node *link; - helper_stateful_request *r = NULL; - if ((link = srv->queue.head)) { - r = link->data; - dlinkDelete(link, &srv->queue); - memFree(link, MEM_DLINK_NODE); - } - return r; -} - -static helper_stateful_request * StatefulDequeue(statefulhelper * hlp) { dlink_node *link; @@ -1006,7 +841,7 @@ StatefulGetFirstAvailable(statefulhelper srv = n->data; if (srv->flags.busy) continue; - if (srv->flags.reserved == S_HELPER_RESERVED) + if (srv->flags.reserved) continue; if (!srv->flags.alive) continue; @@ -1057,32 +892,16 @@ helperStatefulDispatch(helper_stateful_s helperStatefulRequestFree(r); return; } - debug(84, 9) ("helperStatefulDispatch busying helper %s #%d\n", hlp->id_name, srv->index + 1); - if (r->placeholder == 1) { - /* a callback is needed before this request can _use_ a helper. */ - /* we don't care about releasing/deferring this helper. The request NEVER - * gets to the helper. So we throw away the return code */ - r->callback(r->data, srv, NULL); - /* throw away the placeholder */ - helperStatefulRequestFree(r); - /* and push the queue. Note that the callback may have submitted a new - * request to the helper which is why we test for the request*/ - if (srv->request == NULL) { - if (srv->flags.shutdown - && srv->flags.reserved == S_HELPER_FREE - && !srv->deferred_requests) { - int wfd = srv->wfd; - srv->wfd = -1; - comm_close(wfd); - } else { - if (srv->queue.head) - helperStatefulServerKickQueue(srv); - else - helperStatefulKickQueue(hlp); - } + if (!r->buf) { + if (cbdataValid(r->data)) { + r->callback(r->data, srv, NULL); + } else { + debug(84, 1) ("helperStatefulDispatch: no callback data registered\n"); } + helperStatefulRequestFree(r); return; } + debug(84, 9) ("helperStatefulDispatch busying helper %s #%d\n", hlp->id_name, srv->index + 1); srv->flags.busy = 1; srv->request = r; srv->dispatch_time = current_time; @@ -1117,16 +936,10 @@ helperStatefulKickQueue(statefulhelper * { helper_stateful_request *r; helper_stateful_server *srv; - while ((srv = StatefulGetFirstAvailable(hlp)) && (r = StatefulDequeue(hlp))) - helperStatefulDispatch(srv, r); -} - -static void -helperStatefulServerKickQueue(helper_stateful_server * srv) -{ - helper_stateful_request *r; - if ((r = StatefulServerDequeue(srv))) + while ((srv = StatefulGetFirstAvailable(hlp)) && (r = StatefulDequeue(hlp))) { + srv->flags.reserved = 1; helperStatefulDispatch(srv, r); + } } static void diff -rupN squid-2.5.STABLE4/src/http.c squid-2.5.STABLE5/src/http.c --- squid-2.5.STABLE4/src/http.c Mon Aug 18 11:24:25 2003 +++ squid-2.5.STABLE5/src/http.c Fri Jan 30 16:09:12 2004 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.384.2.9 2003/08/18 17:24:25 hno Exp $ + * $Id: http.c,v 1.384.2.12 2004/01/30 23:09:12 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -64,6 +64,13 @@ httpStateFree(int fd, void *data) #endif if (httpState == NULL) return; + if (httpState->body_buf) { + clientAbortBody(httpState->orig_request); + if (httpState->body_buf) { + memFree(httpState->body_buf, MEM_8K_BUF); + httpState->body_buf = NULL; + } + } storeUnlockObject(httpState->entry); if (httpState->reply_hdr) { memFree(httpState->reply_hdr, MEM_8K_BUF); @@ -466,9 +473,16 @@ httpProcessReplyHeader(HttpStateData * h if (httpState->flags.keepalive) if (httpState->peer) httpState->peer->stats.n_keepalives_sent++; - if (reply->keep_alive) + if (reply->keep_alive) { if (httpState->peer) httpState->peer->stats.n_keepalives_recv++; + if (Config.onoff.detect_broken_server_pconns && httpReplyBodySize(httpState->request->method, reply) == -1) { + debug(11, 1) ("httpProcessReplyHeader: Impossible keep-alive header from '%s'\n", storeUrl(entry)); + debug(11, 2) ("GOT HTTP REPLY HDR:\n---------\n%s\n----------\n", + httpState->reply_hdr); + httpState->flags.keepalive_broken = 1; + } + } if (reply->date > -1 && !httpState->peer) { int skew = abs(reply->date - squid_curtime); if (skew > 86400) @@ -571,18 +585,18 @@ httpReadReply(int fd, void *data) #endif kb_incr(&statCounter.server.all.kbytes_in, len); kb_incr(&statCounter.server.http.kbytes_in, len); - commSetTimeout(fd, Config.Timeout.read, NULL, NULL); IOStats.Http.reads++; for (clen = len - 1, bin = 0; clen; bin++) clen >>= 1; IOStats.Http.read_hist[bin]++; } - if (!httpState->reply_hdr && len > 0) { + if (!httpState->reply_hdr && len > 0 && fd_table[fd].uses > 1) { /* Skip whitespace */ while (len > 0 && xisspace(*buf)) xmemmove(buf, buf + 1, len--); if (len == 0) { /* Continue to read... */ + /* Timeout NOT increased. This whitespace was from previous reply */ commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0); return; } @@ -662,7 +676,12 @@ httpReadReply(int fd, void *data) httpState->fd = -1; httpStateFree(fd, httpState); } else { - /* Wait for EOF condition */ + /* Wait for more data or EOF condition */ + if (httpState->flags.keepalive_broken) { + commSetTimeout(fd, 10, NULL, NULL); + } else { + commSetTimeout(fd, Config.Timeout.read, NULL, NULL); + } commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0); } } @@ -696,8 +715,6 @@ httpSendComplete(int fd, char *bufnotuse comm_close(fd); return; } else { - /* Schedule read reply. */ - commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0); /* * Set the read timeout here because it hasn't been set yet. * We only set the read timeout after the request has been @@ -965,8 +982,13 @@ httpSendRequest(HttpStateData * httpStat StoreEntry *entry = httpState->entry; peer *p = httpState->peer; CWCB *sendHeaderDone; + int fd = httpState->fd; + + debug(11, 5) ("httpSendRequest: FD %d: httpState %p.\n", fd, httpState); - debug(11, 5) ("httpSendRequest: FD %d: httpState %p.\n", httpState->fd, httpState); + /* Schedule read reply. (but no timeout set until request fully sent) */ + commSetTimeout(fd, Config.Timeout.lifetime, httpTimeout, httpState); + commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0); if (httpState->orig_request->body_connection) sendHeaderDone = httpSendRequestEntry; @@ -998,8 +1020,8 @@ httpSendRequest(HttpStateData * httpStat entry, &mb, httpState->flags); - debug(11, 6) ("httpSendRequest: FD %d:\n%s\n", httpState->fd, mb.buf); - comm_write_mbuf(httpState->fd, mb, sendHeaderDone, httpState); + debug(11, 6) ("httpSendRequest: FD %d:\n%s\n", fd, mb.buf); + comm_write_mbuf(fd, mb, sendHeaderDone, httpState); } void @@ -1084,7 +1106,19 @@ static void httpRequestBodyHandler(char *buf, ssize_t size, void *data) { HttpStateData *httpState = (HttpStateData *) data; + httpState->body_buf = NULL; if (size > 0) { + if (httpState->reply_hdr_state >= 2 && !httpState->flags.abuse_detected) { + httpState->flags.abuse_detected = 1; + debug(11, 1) ("httpSendRequestEntryDone: Likely proxy abuse detected '%s' -> '%s'\n", + inet_ntoa(httpState->orig_request->client_addr), + storeUrl(httpState->entry)); + if (httpState->entry->mem_obj->reply->sline.status == HTTP_INVALID_HEADER) { + memFree8K(buf); + comm_close(httpState->fd); + return; + } + } comm_write(httpState->fd, buf, size, httpSendRequestEntry, data, memFree8K); } else if (size == 0) { /* End of body */ @@ -1124,7 +1158,8 @@ httpSendRequestEntry(int fd, char *bufno comm_close(fd); return; } - clientReadBody(httpState->orig_request, memAllocate(MEM_8K_BUF), 8192, httpRequestBodyHandler, httpState); + httpState->body_buf = memAllocate(MEM_8K_BUF); + clientReadBody(httpState->orig_request, httpState->body_buf, 8192, httpRequestBodyHandler, httpState); } void diff -rupN squid-2.5.STABLE4/src/ipcache.c squid-2.5.STABLE5/src/ipcache.c --- squid-2.5.STABLE4/src/ipcache.c Tue Nov 13 15:16:24 2001 +++ squid-2.5.STABLE5/src/ipcache.c Thu Feb 12 02:32:09 2004 @@ -1,6 +1,6 @@ /* - * $Id: ipcache.c,v 1.236 2001/11/13 22:16:24 hno Exp $ + * $Id: ipcache.c,v 1.236.2.3 2004/02/12 09:32:09 hno Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -77,9 +77,9 @@ static IPH dummy_handler; static int ipcacheExpiredEntry(ipcache_entry *); static int ipcache_testname(void); #if USE_DNSSERVERS -static ipcache_entry *ipcacheParse(const char *buf); +static ipcache_entry *ipcacheParse(ipcache_entry *, const char *buf); #else -static ipcache_entry *ipcacheParse(rfc1035_rr *, int); +static ipcache_entry *ipcacheParse(ipcache_entry *, rfc1035_rr *, int, const char *error); #endif static ipcache_entry *ipcache_get(const char *); static void ipcacheLockEntry(ipcache_entry *); @@ -230,97 +230,106 @@ ipcacheCallback(ipcache_entry * i) ipcacheUnlockEntry(i); } -static ipcache_entry * #if USE_DNSSERVERS -ipcacheParse(const char *inbuf) +static ipcache_entry * +ipcacheParse(ipcache_entry * i, const char *inbuf) { LOCAL_ARRAY(char, buf, DNS_INBUF_SZ); char *token; - static ipcache_entry i; - int j; + int j = 0; int k; int ipcount = 0; int ttl; char A[32][16]; - memset(&i, '\0', sizeof(i)); - i.expires = squid_curtime; - i.flags.negcached = 1; + const char *name = (const char *) i->hash.key; + i->expires = squid_curtime + Config.negativeDnsTtl; + i->flags.negcached = 1; + safe_free(i->addrs.in_addrs); + safe_free(i->addrs.bad_mask); + safe_free(i->error_message); + i->addrs.count = 0; if (inbuf == NULL) { debug(14, 1) ("ipcacheParse: Gotreply\n"); - i.error_message = xstrdup("Internal Squid Error"); - return &i; + i->error_message = xstrdup("Internal Squid Error"); + return i; } xstrncpy(buf, inbuf, DNS_INBUF_SZ); debug(14, 5) ("ipcacheParse: parsing: {%s}\n", buf); token = strtok(buf, w_space); if (NULL == token) { - debug(14, 1) ("ipcacheParse: Got , expecting '$addr'\n"); - return &i; + debug(14, 1) ("ipcacheParse: expecting result, got '%s'\n", inbuf); + i->error_message = xstrdup("Internal Squid Error"); + return NULL; } if (0 == strcmp(token, "$fail")) { - i.expires = squid_curtime + Config.negativeDnsTtl; token = strtok(NULL, "\n"); assert(NULL != token); - i.error_message = xstrdup(token); - return &i; + i->error_message = xstrdup(token); + return i; } if (0 != strcmp(token, "$addr")) { - debug(14, 1) ("ipcacheParse: Got '%s', expecting '$addr'\n", token); - return &i; + debug(14, 1) ("ipcacheParse: expecting '$addr', got '%s' in response to '%s'\n", inbuf, name); + i->error_message = xstrdup("Internal Squid Error"); + return NULL; } token = strtok(NULL, w_space); if (NULL == token) { - debug(14, 1) ("ipcacheParse: Got , expecting TTL\n"); - return &i; + debug(14, 1) ("ipcacheParse: expecting data, got '%s' in response to '%s'\n", inbuf, name); + i->error_message = xstrdup("Internal Squid Error"); + return NULL; } - i.flags.negcached = 0; + i->flags.negcached = 0; ttl = atoi(token); - if (ttl > 0) - i.expires = squid_curtime + ttl; - else - i.expires = squid_curtime + Config.positiveDnsTtl; while (NULL != (token = strtok(NULL, w_space))) { xstrncpy(A[ipcount], token, 16); if (++ipcount == 32) break; } - if (0 == ipcount) { - i.addrs.in_addrs = NULL; - i.addrs.bad_mask = NULL; + if (ipcount <= 0) { + debug(14, 1) ("ipcacheParse: No addresses in response to '%s'\n", name); } else { - i.addrs.in_addrs = xcalloc(ipcount, sizeof(struct in_addr)); - i.addrs.bad_mask = xcalloc(ipcount, sizeof(unsigned char)); - } - for (j = 0, k = 0; k < ipcount; k++) { - if (safe_inet_addr(A[k], &i.addrs.in_addrs[j])) - j++; - else - debug(14, 1) ("ipcacheParse: Invalid IP address '%s'\n", A[k]); + i->addrs.in_addrs = xcalloc(ipcount, sizeof(struct in_addr)); + i->addrs.bad_mask = xcalloc(ipcount, sizeof(unsigned char)); + for (j = 0, k = 0; k < ipcount; k++) { + if (safe_inet_addr(A[k], &i->addrs.in_addrs[j])) + j++; + else + debug(14, 1) ("ipcacheParse: Invalid IP address '%s' in response to '%s'\n", A[k], name); + } } - i.addrs.count = (unsigned char) j; - return &i; + i->addrs.count = (unsigned char) j; + if (ttl == 0 || ttl > Config.positiveDnsTtl) + ttl = Config.positiveDnsTtl; + if (ttl < Config.negativeDnsTtl) + ttl = Config.negativeDnsTtl; + i->expires = squid_curtime + ttl; + return i; } #else -ipcacheParse(rfc1035_rr * answers, int nr) +static ipcache_entry * +ipcacheParse(ipcache_entry * i, rfc1035_rr * answers, int nr, const char *error_message) { - static ipcache_entry i; int k; int j; int na = 0; - memset(&i, '\0', sizeof(i)); - i.expires = squid_curtime + Config.negativeDnsTtl; - i.flags.negcached = 1; + int ttl = 0; + const char *name = (const char *) i->hash.key; + i->expires = squid_curtime + Config.negativeDnsTtl; + i->flags.negcached = 1; + safe_free(i->addrs.in_addrs); + safe_free(i->addrs.bad_mask); + safe_free(i->error_message); + i->addrs.count = 0; if (nr < 0) { - debug(14, 3) ("ipcacheParse: Lookup failed (error %d)\n", - rfc1035_errno); - assert(rfc1035_error_message); - i.error_message = xstrdup(rfc1035_error_message); - return &i; + debug(14, 3) ("ipcacheParse: Lookup failed '%s' for '%s'\n", + error_message, (const char *) i->hash.key); + i->error_message = xstrdup(error_message); + return i; } if (nr == 0) { - debug(14, 3) ("ipcacheParse: No DNS records\n"); - i.error_message = xstrdup("No DNS records"); - return &i; + debug(14, 3) ("ipcacheParse: No DNS records in response to '%s'\n", name); + i->error_message = xstrdup("No DNS records"); + return i; } assert(answers); for (j = 0, k = 0; k < nr; k++) { @@ -331,29 +340,34 @@ ipcacheParse(rfc1035_rr * answers, int n na++; } if (na == 0) { - debug(14, 1) ("ipcacheParse: No Address records\n"); - i.error_message = xstrdup("No Address records"); - return &i; - } - i.flags.negcached = 0; - i.addrs.in_addrs = xcalloc(na, sizeof(struct in_addr)); - i.addrs.bad_mask = xcalloc(na, sizeof(unsigned char)); - i.addrs.count = (unsigned char) na; + debug(14, 1) ("ipcacheParse: No Address records in response to '%s'\n", name); + i->error_message = xstrdup("No Address records"); + return i; + } + i->flags.negcached = 0; + i->addrs.in_addrs = xcalloc(na, sizeof(struct in_addr)); + i->addrs.bad_mask = xcalloc(na, sizeof(unsigned char)); for (j = 0, k = 0; k < nr; k++) { if (answers[k].type != RFC1035_TYPE_A) continue; if (answers[k].class != RFC1035_CLASS_IN) continue; - if (j == 0) - i.expires = squid_curtime + answers[k].ttl; + if (ttl == 0 || ttl > answers[k].ttl) + ttl = answers[k].ttl; assert(answers[k].rdlength == 4); - xmemcpy(&i.addrs.in_addrs[j++], answers[k].rdata, 4); + xmemcpy(&i->addrs.in_addrs[j++], answers[k].rdata, 4); debug(14, 3) ("ipcacheParse: #%d %s\n", j - 1, - inet_ntoa(i.addrs.in_addrs[j - 1])); + inet_ntoa(i->addrs.in_addrs[j - 1])); } + i->addrs.count = (unsigned char) na; + if (ttl == 0 || ttl > Config.positiveDnsTtl) + ttl = Config.positiveDnsTtl; + if (ttl < Config.negativeDnsTtl) + ttl = Config.negativeDnsTtl; + i->expires = squid_curtime + ttl; assert(j == na); - return &i; + return i; } #endif @@ -361,27 +375,21 @@ static void #if USE_DNSSERVERS ipcacheHandleReply(void *data, char *reply) #else -ipcacheHandleReply(void *data, rfc1035_rr * answers, int na) +ipcacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_message) #endif { generic_cbdata *c = data; ipcache_entry *i = c->data; - ipcache_entry *x = NULL; cbdataFree(c); c = NULL; IpcacheStats.replies++; statHistCount(&statCounter.dns.svc_time, tvSubMsec(i->request_time, current_time)); #if USE_DNSSERVERS - x = ipcacheParse(reply); + ipcacheParse(i, reply); #else - x = ipcacheParse(answers, na); + ipcacheParse(i, answers, na, error_message); #endif - assert(x); - i->addrs = x->addrs; - i->error_message = x->error_message; - i->expires = x->expires; - i->flags = x->flags; ipcacheAddEntry(i); ipcacheCallback(i); } diff -rupN squid-2.5.STABLE4/src/main.c squid-2.5.STABLE5/src/main.c --- squid-2.5.STABLE4/src/main.c Sun Jun 8 17:28:46 2003 +++ squid-2.5.STABLE5/src/main.c Wed Dec 17 14:10:30 2003 @@ -1,6 +1,6 @@ /* - * $Id: main.c,v 1.345.2.11 2003/06/08 23:28:46 wessels Exp $ + * $Id: main.c,v 1.345.2.13 2003/12/17 21:10:30 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -329,7 +329,7 @@ serverConnectionsClose(void) static void mainReconfigure(void) { - debug(1, 1) ("Restarting Squid Cache (version %s)...\n", version_string); + debug(1, 1) ("Reconfiguring Squid Cache (version %s)...\n", version_string); reconfiguring = 1; /* Already called serverConnectionsClose and ipcacheShutdownServers() */ serverConnectionsClose(); @@ -832,6 +832,10 @@ checkRunningPid(void) { pid_t pid; debug_log = stderr; + if (strcmp(Config.pidFilename, "none") == 0) { + debug(0, 1) ("No pid_filename specified. Trusting you know what you are doing.\n"); + return 0; + } pid = readPidFile(); if (pid < 2) return 0; diff -rupN squid-2.5.STABLE4/src/mime.c squid-2.5.STABLE5/src/mime.c --- squid-2.5.STABLE4/src/mime.c Sat Nov 9 21:43:31 2002 +++ squid-2.5.STABLE5/src/mime.c Sun Dec 14 06:33:47 2003 @@ -1,6 +1,6 @@ /* - * $Id: mime.c,v 1.102.2.2 2002/11/10 04:43:31 hno Exp $ + * $Id: mime.c,v 1.102.2.3 2003/12/14 13:33:47 hno Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -219,10 +219,17 @@ mimeGetIcon(const char *fn) const char * mimeGetIconURL(const char *fn) { + static MemBuf mb = MemBufNULL; char *icon = mimeGetIcon(fn); if (icon == NULL) return null_string; - return internalLocalUri("/squid-internal-static/icons/", icon); + if (Config.icons.use_short_names) { + memBufReset(&mb); + memBufPrintf(&mb, "/squid-internal-static/icons/%s", icon); + return mb.buf; + } else { + return internalLocalUri("/squid-internal-static/icons/", icon); + } } char * diff -rupN squid-2.5.STABLE4/src/mime.conf.default squid-2.5.STABLE5/src/mime.conf.default --- squid-2.5.STABLE4/src/mime.conf.default Wed Aug 22 03:25:41 2001 +++ squid-2.5.STABLE5/src/mime.conf.default Wed Feb 25 17:03:02 2004 @@ -14,122 +14,181 @@ # # regexp content-type icon encoding mode #----------------------------------------------------------------------------------- -\.gif$ image/gif anthony-image.gif - image +\.gif$ image/gif anthony-image.gif - image +download \.mime$ www/mime anthony-text.gif - ascii +download -^internal-dirup$ - anthony-dirup.gif - ascii -^internal-dir$ - anthony-dir.gif - ascii -^internal-link$ - anthony-link.gif - ascii -^internal-menu$ - anthony-dir.gif - ascii -^internal-text$ - anthony-text.gif - ascii -^internal-index$ - anthony-dir.gif - ascii -^internal-image$ - anthony-image.gif - ascii -^internal-sound$ - anthony-sound.gif - ascii -^internal-movie$ - anthony-movie.gif - ascii -^internal-telnet$ - anthony-portal.gif - ascii -^internal-binary$ - anthony-box.gif - ascii -^internal-unknown$ - anthony-unknown.gif - ascii -^internal-view$ - anthony-text.gif - ascii -^internal-download$ - anthony-box.gif - ascii -\.bin$ application/macbinary anthony-unknown.gif - image -\.oda$ application/oda anthony-unknown.gif - image -\.exe$ application/octet-stream anthony-unknown.gif - image -\.pdf$ application/pdf anthony-unknown.gif - image -\.ai$ application/postscript anthony-ps.gif - ascii +download -\.eps$ application/postscript anthony-ps.gif - ascii +download -\.ps$ application/postscript anthony-ps.gif - ascii +download +view -\.rtf$ application/x-rtf anthony-unknown.gif - image -\.Z$ - anthony-compressed.gif compress image -\.gz$ - anthony-unknown.gif gzip image -\.tgz$ application/x-tar anthony-tar.gif gzip image -\.csh$ application/x-csh anthony-script.gif - ascii -\.dvi$ application/x-dvi anthony-dvi.gif - image -\.hdf$ application/x-hdf anthony-unknown.gif - image -\.latex$ application/x-latex anthony-tex.gif - ascii -\.lsm$ text/plain anthony-text.gif - ascii -\.nc$ application/x-netcdf anthony-unknown.gif - image +^internal-dirup$ - anthony-dirup.gif - - +^internal-dir$ - anthony-dir.gif - - +^internal-link$ - anthony-link.gif - - +^internal-menu$ - anthony-dir.gif - - +^internal-text$ - anthony-text.gif - - +^internal-index$ - anthony-dir.gif - - +^internal-image$ - anthony-image.gif - - +^internal-sound$ - anthony-sound.gif - - +^internal-movie$ - anthony-movie.gif - - +^internal-telnet$ - anthony-portal.gif - - +^internal-binary$ - anthony-box.gif - - +^internal-unknown$ - anthony-unknown.gif - - +^internal-view$ - anthony-text.gif - - +^internal-download$ - anthony-box.gif - - +\.bin$ application/macbinary anthony-unknown.gif - image +download +\.oda$ application/oda anthony-unknown.gif - image +download +\.exe$ application/octet-stream anthony-unknown.gif - image +download +\.pdf$ application/pdf anthony-unknown.gif - image +download +\.ai$ application/postscript anthony-ps.gif - image +download +view +\.eps$ application/postscript anthony-ps.gif - image +download +view +\.ps$ application/postscript anthony-ps.gif - image +download +view +\.rtf$ text/rtf anthony-text.gif - ascii +download +view +\.Z$ - anthony-compressed.gif compress image +download +\.gz$ - anthony-compressed.gif gzip image +download +\.bz2$ application/octet-stream anthony-compressed.gif - image +download +\.bz$ application/octet-stream anthony-compressed.gif - image +download +\.tgz$ application/x-tar anthony-tar.gif gzip image +download +\.csh$ application/x-csh anthony-script.gif - ascii +download +view +\.dvi$ application/x-dvi anthony-dvi.gif - image +download +\.hdf$ application/x-hdf anthony-unknown.gif - image +download +\.latex$ application/x-latex anthony-tex.gif - ascii +download +view +\.lsm$ text/plain anthony-text.gif - ascii +download +view +\.nc$ application/x-netcdf anthony-unknown.gif - image +download \.cdf$ application/x-netcdf anthony-unknown.gif - ascii +download -\.sh$ application/x-sh anthony-script.gif - ascii -\.tcl$ application/x-tcl anthony-script.gif - ascii +view -\.tex$ application/x-tex anthony-tex.gif - ascii -\.texi$ application/x-texinfo anthony-tex.gif - ascii -\.texinfo$ application/x-texinfo anthony-tex.gif - ascii -\.t$ application/x-troff anthony-text.gif - ascii -\.roff$ application/x-troff anthony-text.gif - ascii -\.tr$ application/x-troff anthony-text.gif - ascii -\.man$ application/x-troff-man anthony-text.gif - ascii -\.me$ application/x-troff-me anthony-text.gif - ascii -\.ms$ application/x-troff-ms anthony-text.gif - ascii -\.src$ application/x-wais-source anthony-text.gif - ascii +download -\.zip$ application/x-zip-compressed anthony-compressed.gif - image -\.bcpio$ application/x-bcpio anthony-unknown.gif - image -\.cpio$ application/x-cpio anthony-unknown.gif - image -\.gtar$ application/x-gtar anthony-tar.gif - image -\.rpm$ application/x-rpm anthony-unknown.gif - image +\.sh$ application/x-sh anthony-script.gif - ascii +download +view +\.tcl$ application/x-tcl anthony-script.gif - ascii +download +view +\.tex$ application/x-tex anthony-tex.gif - ascii +download +view +\.texi$ application/x-texinfo anthony-tex.gif - ascii +download +view +\.texinfo$ application/x-texinfo anthony-tex.gif - ascii +download +view +\.t$ application/x-troff anthony-text.gif - ascii +download +view +\.roff$ application/x-troff anthony-text.gif - ascii +download +view +\.tr$ application/x-troff anthony-text.gif - ascii +download +view +\.man$ application/x-troff-man anthony-text.gif - ascii +download +view +\.me$ application/x-troff-me anthony-text.gif - ascii +download +view +\.ms$ application/x-troff-ms anthony-text.gif - ascii +download +view +\.src$ application/x-wais-source anthony-unknown.gif - ascii +download +\.zip$ application/zip anthony-compressed.gif - image +download +\.bcpio$ application/x-bcpio anthony-box.gif - image +download +\.cpio$ application/x-cpio anthony-box.gif - image +download +\.gtar$ application/x-gtar anthony-tar.gif - image +download +\.rpm$ application/x-rpm anthony-unknown.gif - image +download \.shar$ application/x-shar anthony-script.gif - image +download +view -\.sv4cpio$ application/x-sv4cpio anthony-unknown.gif - image -\.sv4crc$ application/x-sv4crc anthony-unknown.gif - image -\.tar$ application/x-tar anthony-tar.gif - image -\.ustar$ application/x-ustar anthony-tar.gif - image -\.au$ audio/basic anthony-sound.gif - image -\.snd$ audio/basic anthony-sound.gif - image -\.mp2$ audio/basic anthony-sound.gif - image -\.mp3$ audio/basic anthony-sound.gif - image -\.aif$ audio/x-aiff anthony-sound.gif - image -\.aiff$ audio/x-aiff anthony-sound.gif - image -\.aifc$ audio/x-aiff anthony-sound.gif - image -\.wav$ audio/x-wav anthony-sound.gif - image -\.ief$ image/ief anthony-image.gif - image -\.jpeg$ image/jpeg anthony-image.gif - image -\.jpg$ image/jpeg anthony-image.gif - image -\.jpe$ image/jpeg anthony-image.gif - image -\.tiff$ image/tiff anthony-image.gif - image -\.tif$ image/tiff anthony-image.gif - image -\.ras$ image/cmu-raster anthony-image.gif - image -\.pnm$ image/x-portable-anymap anthony-image.gif - image -\.pbm$ image/x-portable-bitmap anthony-image.gif - image -\.pgm$ image/x-portable-graymap anthony-image.gif - image -\.ppm$ image/x-portable-pixmap anthony-image.gif - image -\.rgb$ image/x-rgb anthony-image.gif - image -\.xbm$ image/x-xbitmap anthony-xbm.gif - image -\.xpm$ image/x-xpixmap anthony-xpm.gif - image -\.xwd$ image/x-xwindowdump anthony-image.gif - image -\.html$ text/html anthony-text.gif - ascii -\.htm$ text/html anthony-text.gif - ascii -\.c$ text/plain anthony-c.gif - ascii -\.h$ text/plain anthony-c.gif - ascii -\.cc$ text/plain anthony-c.gif - ascii -\.hh$ text/plain anthony-c.gif - ascii -\.m$ text/plain anthony-text.gif - ascii -\.f90$ text/plain anthony-text.gif - ascii -\.txt$ text/plain anthony-text.gif - ascii -\.rtx$ text/richtext anthony-text.gif - ascii +download -\.tsv$ text/tab-separated-values anthony-text.gif - ascii +download -\.etx$ text/x-setext anthony-text.gif - ascii +download -\.mpeg$ video/mpeg anthony-movie.gif - image -\.mpg$ video/mpeg anthony-movie.gif - image -\.mpe$ video/mpeg anthony-movie.gif - image -\.qt$ video/quicktime anthony-movie.gif - image -\.mov$ video/quicktime anthony-movie.gif - image -\.avi$ video/x-msvideo anthony-movie.gif - image -\.movie$ video/x-sgi-movie anthony-movie.gif - image -\.hqx$ application/mac-binhex40 anthony-binhex.gif - image -\.mwrt$ application/macwriteii anthony-unknown.gif - image -\.msw$ application/msword anthony-unknown.gif - image -\.doc$ application/msword anthony-unknown.gif - image +view -\.xls$ application/msexcel anthony-unknown.gif - image -\.wk[s1234]$ application/vnd.lotus-1-2-3 anthony-unknown.gif - image -\.mif$ application/x-mif anthony-unknown.gif - image -\.sit$ application/stuffit anthony-unknown.gif - image -\.pict$ application/pict anthony-image.gif - image -\.pic$ application/pict anthony-image.gif - image -\.arj$ application/x-arj-compressed anthony-compressed.gif - image -\.lzh$ application/x-lha-compressed anthony-compressed.gif - image -\.lha$ application/x-lha-compressed anthony-compressed.gif - image -\.zlib$ application/x-deflate anthony-compressed.gif deflate image +\.sv4cpio$ application/x-sv4cpio anthony-box.gif - image +download +\.sv4crc$ application/x-sv4crc anthony-box.gif - image +download +\.tar$ application/x-tar anthony-tar.gif - image +download +\.ustar$ application/x-ustar anthony-tar.gif - image +download +\.au$ audio/basic anthony-sound.gif - image +download +\.snd$ audio/basic anthony-sound.gif - image +download +\.mp2$ audio/mpeg anthony-sound.gif - image +download +\.mp3$ audio/mpeg anthony-sound.gif - image +download +\.mpga$ audio/mpeg anthony-sound.gif - image +download +\.aif$ audio/x-aiff anthony-sound.gif - image +download +\.aiff$ audio/x-aiff anthony-sound.gif - image +download +\.aifc$ audio/x-aiff anthony-sound.gif - image +download +\.wav$ audio/x-wav anthony-sound.gif - image +download +\.bmp$ image/bmp anthony-image.gif - image +download +\.ief$ image/ief anthony-image.gif - image +download +\.jpeg$ image/jpeg anthony-image.gif - image +download +\.jpg$ image/jpeg anthony-image.gif - image +download +\.jpe$ image/jpeg anthony-image.gif - image +download +\.tiff$ image/tiff anthony-image.gif - image +download +\.tif$ image/tiff anthony-image.gif - image +download +\.ras$ image/x-cmu-raster anthony-image.gif - image +download +\.pnm$ image/x-portable-anymap anthony-image.gif - image +download +\.pbm$ image/x-portable-bitmap anthony-image.gif - image +download +\.pgm$ image/x-portable-graymap anthony-image.gif - image +download +\.ppm$ image/x-portable-pixmap anthony-image.gif - image +download +\.rgb$ image/x-rgb anthony-image.gif - image +download +\.xbm$ image/x-xbitmap anthony-xbm.gif - image +download +\.xpm$ image/x-xpixmap anthony-xpm.gif - image +download +\.xwd$ image/x-xwindowdump anthony-image.gif - image +download +\.html$ text/html anthony-text.gif - ascii +download +view +\.htm$ text/html anthony-text.gif - ascii +download +view +\.css$ text/css anthony-script.gif - ascii +download +view +\.js$ application/x-javascript anthony-c.gif - ascii +download +view +\.c$ text/plain anthony-c.gif - ascii +download +\.h$ text/plain anthony-c.gif - ascii +download +\.cc$ text/plain anthony-c.gif - ascii +download +\.cpp$ text/plain anthony-c.gif - ascii +download +\.hh$ text/plain anthony-c.gif - ascii +download +\.m$ text/plain anthony-script.gif - ascii +download +\.f90$ text/plain anthony-f.gif - ascii +download +\.txt$ text/plain anthony-text.gif - ascii +download +\.asc$ text/plain anthony-text.gif - ascii +download +\.rtx$ text/richtext anthony-quill.gif - ascii +download +view +\.tsv$ text/tab-separated-values anthony-script.gif - ascii +download +view +\.etx$ text/x-setext anthony-text.gif - ascii +download +view +\.mpeg$ video/mpeg anthony-movie.gif - image +download +\.mpg$ video/mpeg anthony-movie.gif - image +download +\.mpe$ video/mpeg anthony-movie.gif - image +download +\.qt$ video/quicktime anthony-movie.gif - image +download +\.mov$ video/quicktime anthony-movie.gif - image +download +\.avi$ video/x-msvideo anthony-movie.gif - image +download +\.movie$ video/x-sgi-movie anthony-movie.gif - image +download +\.cpt$ application/mac-compactpro anthony-unknown.gif - image +download +\.hqx$ application/mac-binhex40 anthony-binhex.gif - image +download +\.mwrt$ application/macwriteii anthony-text.gif - image +download +\.msw$ application/msword anthony-script.gif - image +download +\.doc$ application/msword anthony-layout.gif - image +download +view +\.xls$ application/vnd.ms-excel anthony-layout.gif - image +download +\.ppt$ application/vnd.ms-powerpoint anthony-image2.gif - image +download +\.wk[s1234]$ application/vnd.lotus-1-2-3 anthony-script.gif - image +download +\.mif$ application/vnd.mif anthony-unknown.gif - image +download +\.sit$ application/x-stuffit anthony-compressed.gif - image +download +\.pict$ application/pict anthony-image.gif - image +download +\.pic$ application/pict anthony-image.gif - image +download +\.arj$ application/x-arj-compressed anthony-compressed.gif - image +download +\.lzh$ application/x-lha-compressed anthony-compressed.gif - image +download +\.lha$ application/x-lha-compressed anthony-compressed.gif - image +download +\.zlib$ application/x-deflate anthony-compressed.gif deflate image +download README text/plain anthony-text.gif - ascii +download -^core$ application/octet-stream anthony-bomb.gif - image -\.core$ application/octet-stream anthony-bomb.gif - image -\.png$ image/png anthony-image.gif - image -\.cab$ application/octet-stream anthony-compressed.gif - image +view +^core$ application/octet-stream anthony-bomb.gif - image +download +\.core$ application/octet-stream anthony-bomb.gif - image +download +\.png$ image/png anthony-image.gif - image +download +\.cab$ application/octet-stream anthony-compressed.gif - image +download +view +\.xpi$ application/x-xpinstall anthony-unknown.gif - image +download +\.class$ application/octet-stream anthony-unknown.gif - image +download +\.java$ text/plain anthony-c.gif - ascii +download +\.dcr$ application/x-director anthony-unknown.gif - image +download +\.dir$ application/x-director anthony-unknown.gif - image +download +\.dxr$ application/x-director anthony-unknown.gif - image +download +\.djv$ image/vnd.djvu anthony-image.gif - image +download +\.djvu$ image/vnd.djvu anthony-image.gif - image +download +\.dll$ application/octet-stream anthony-unknown.gif - image +download +\.dms$ application/octet-stream anthony-unknown.gif - image +download +\.ez$ application/andrew-inset anthony-unknown.gif - image +download +\.ice$ x-conference/x-cooltalk anthony-unknown.gif - image +download +\.iges$ model/iges anthony-image.gif - image +download +\.igs$ model/iges anthony-image.gif - image +download +\.kar$ audio/midi anthony-sound.gif - image +download +\.mid$ audio/midi anthony-sound.gif - image +download +\.midi$ audio/midi anthony-sound.gif - image +download +\.mesh$ model/mesh anthony-image.gif - image +download +\.silo$ model/mesh anthony-image.gif - image +download +\.mxu$ video/vnd.mpegurl anthony-movie.gif - image +download +\.pdb$ chemical/x-pdb anthony-unknown.gif - image +download +\.pgn$ application/x-chess-pgn anthony-unknown.gif - image +download +\.ra$ audio/x-realaudio anthony-sound.gif - image +download +\.ram$ audio/x-pn-realaudio anthony-sound.gif - image +download +\.rm$ audio/x-pn-realaudio anthony-sound.gif - image +download +\.sgml$ text/sgml anthony-text.gif - ascii +download +\.sgm$ text/sgml anthony-text.gif - ascii +download +\.skd$ application/x-koan anthony-unknown.gif - image +download +\.skm$ application/x-koan anthony-unknown.gif - image +download +\.skp$ application/x-koan anthony-unknown.gif - image +download +\.skt$ application/x-koan anthony-unknown.gif - image +download +\.smi$ application/smil anthony-unknown.gif - image +download +\.smil$ application/smil anthony-unknown.gif - image +download +\.so$ application/octet-stream anthony-unknown.gif - image +download +\.spl$ application/x-futuresplash anthony-unknown.gif - image +download +\.swf$ application/x-shockwave-flash anthony-unknown.gif - image +download +\.vcd$ application/x-cdlink anthony-unknown.gif - image +download +\.vrml$ model/vrml anthony-image.gif - image +download +\.wbmp$ image/vnd.wap.wbmp anthony-image.gif - image +download +\.wbxml$ application/vnd.wap.wbxml anthony-unknown.gif - image +download +\.wmlc$ application/vnd.wap.wmlc anthony-unknown.gif - image +download +\.wmlsc$ application/vnd.wap.wmlscriptc anthony-script.gif - image +download +\.wmls$ application/vnd.wap.wmlscript anthony-script.gif - image +download +\.xht$ application/xhtml anthony-text.gif - ascii +download +\.xhtml$ application/xhtml anthony-text.gif - ascii +download +\.xml$ text/xml anthony-text.gif - ascii +download +\.xsl$ text/xml anthony-layout.gif - ascii +download +\.xyz$ chemical/x-xyz anthony-unknown.gif - image +download + # the default -. text/plain anthony-unknown.gif - image +view +download +. text/plain anthony-unknown.gif - image +download +view diff -rupN squid-2.5.STABLE4/src/neighbors.c squid-2.5.STABLE5/src/neighbors.c --- squid-2.5.STABLE4/src/neighbors.c Tue Aug 12 18:28:19 2003 +++ squid-2.5.STABLE5/src/neighbors.c Sat Nov 29 11:53:00 2003 @@ -1,6 +1,6 @@ /* - * $Id: neighbors.c,v 1.299.2.3 2003/08/13 00:28:19 wessels Exp $ + * $Id: neighbors.c,v 1.299.2.4 2003/11/29 18:53:00 hno Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -48,8 +48,7 @@ static void neighborAliveHtcp(peer *, co static void neighborCountIgnored(peer *); static void peerRefreshDNS(void *); static IPH peerDNSConfigure; -static void peerProbeConnect(peer *); -static IPH peerProbeConnect2; +static int peerProbeConnect(peer *); static CNCB peerProbeConnectDone; static void peerCountMcastPeersDone(void *data); static void peerCountMcastPeersStart(void *data); @@ -590,20 +589,17 @@ peerDigestLookup(peer * p, request_t * r if (!p->digest) { debug(15, 5) ("peerDigestLookup: gone!\n"); return LOOKUP_NONE; - } else if (!peerHTTPOkay(p, request)) { - debug(15, 5) ("peerDigestLookup: !peerHTTPOkay\n"); - return LOOKUP_NONE; - } else if (p->digest->flags.usable) { - debug(15, 5) ("peerDigestLookup: usable\n"); - /* fall through; put here to have common case on top */ ; } else if (!p->digest->flags.needed) { debug(15, 5) ("peerDigestLookup: note need\n"); peerDigestNeeded(p->digest); return LOOKUP_NONE; - } else { + } else if (!p->digest->flags.usable) { debug(15, 5) ("peerDigestLookup: !ready && %srequested\n", p->digest->flags.requested ? "" : "!"); return LOOKUP_NONE; + } else if (!peerHTTPOkay(p, request)) { + debug(15, 5) ("peerDigestLookup: !peerHTTPOkay\n"); + return LOOKUP_NONE; } debug(15, 5) ("peerDigestLookup: OK to lookup peer %s\n", p->host); assert(p->digest->cd); @@ -935,8 +931,8 @@ int neighborUp(const peer * p) { if (!p->tcp_up) { - peerProbeConnect((peer *) p); - return 0; + if (!peerProbeConnect((peer *) p)) + return 0; } if (p->options.no_query) return 1; @@ -1042,15 +1038,14 @@ peerRefreshDNS(void *data) eventAddIsh("peerRefreshDNS", peerRefreshDNS, NULL, 3600.0, 1); } -void -peerConnectFailed(peer * p) +static void +peerConnectFailedSilent(peer * p) { p->stats.last_connect_failure = squid_curtime; if (!p->tcp_up) { debug(15, 2) ("TCP connection to %s/%d dead\n", p->host, p->http_port); return; } - debug(15, 1) ("TCP connection to %s/%d failed\n", p->host, p->http_port); p->tcp_up--; if (!p->tcp_up) { debug(15, 1) ("Detected DEAD %s: %s/%d/%d\n", @@ -1061,6 +1056,13 @@ peerConnectFailed(peer * p) } void +peerConnectFailed(peer * p) +{ + debug(15, 1) ("TCP connection to %s/%d failed\n", p->host, p->http_port); + peerConnectFailedSilent(p); +} + +void peerConnectSucceded(peer * p) { if (!p->tcp_up) { @@ -1073,35 +1075,42 @@ peerConnectSucceded(peer * p) p->tcp_up = PEER_TCP_MAGIC_COUNT; } +static void +peerProbeConnectTimeout(int fd, void *data) +{ + peer *p = data; + comm_close(fd); + p->test_fd = -1; + peerConnectFailedSilent(p); +} + /* * peerProbeConnect will be called on dead peers by neighborUp */ -static void +static int peerProbeConnect(peer * p) { int fd; + time_t ctimeout = p->connect_timeout > 0 ? p->connect_timeout + : Config.Timeout.peer_connect; + int ret = squid_curtime - p->stats.last_connect_failure > ctimeout * 10; if (p->test_fd != -1) - return; /* probe already running */ - if (squid_curtime - p->stats.last_connect_probe < Config.Timeout.connect) - return; /* don't probe to often */ + return ret; /* probe already running */ + if (squid_curtime - p->stats.last_connect_probe == 0) + return ret; /* don't probe to often */ fd = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), 0, COMM_NONBLOCKING, p->host); if (fd < 0) - return; + return ret; + commSetTimeout(fd, ctimeout, peerProbeConnectTimeout, p); p->test_fd = fd; p->stats.last_connect_probe = squid_curtime; - ipcache_nbgethostbyname(p->host, peerProbeConnect2, p); -} - -static void -peerProbeConnect2(const ipcache_addrs * ianotused, void *data) -{ - peer *p = data; commConnectStart(p->test_fd, p->host, p->http_port, peerProbeConnectDone, p); + return ret; } static void @@ -1111,7 +1120,7 @@ peerProbeConnectDone(int fd, int status, if (status == COMM_OK) { peerConnectSucceded(p); } else { - peerConnectFailed(p); + peerConnectFailedSilent(p); } comm_close(fd); p->test_fd = -1; diff -rupN squid-2.5.STABLE4/src/pconn.c squid-2.5.STABLE5/src/pconn.c --- squid-2.5.STABLE4/src/pconn.c Fri Apr 13 18:03:23 2001 +++ squid-2.5.STABLE5/src/pconn.c Mon Dec 15 16:38:43 2003 @@ -1,6 +1,6 @@ /* - * $Id: pconn.c,v 1.31 2001/04/14 00:03:23 hno Exp $ + * $Id: pconn.c,v 1.31.2.2 2003/12/15 23:38:43 hno Exp $ * * DEBUG: section 48 Persistent Connections * AUTHOR: Duane Wessels @@ -95,11 +95,11 @@ static void pconnRemoveFD(struct _pconn *p, int fd) { int i; - for (i = 0; i < p->nfds; i++) { + for (i = p->nfds - 1; i >= 0; i--) { if (p->fds[i] == fd) break; } - assert(i < p->nfds); + assert(i >= 0); debug(48, 3) ("pconnRemoveFD: found FD %d at index %d\n", fd, i); for (; i < p->nfds - 1; i++) p->fds[i] = p->fds[i + 1]; @@ -190,7 +190,7 @@ pconnPush(int fd, const char *host, u_sh int *old; LOCAL_ARRAY(char, key, SQUIDHOSTNAMELEN + 10); LOCAL_ARRAY(char, desc, FD_DESC_SZ); - if (fdNFree() < (RESERVED_FD << 1)) { + if (fdUsageHigh()) { debug(48, 3) ("pconnPush: Not many unused FDs\n"); comm_close(fd); return; @@ -235,7 +235,7 @@ pconnPop(const char *host, u_short port) if (hptr != NULL) { p = (struct _pconn *) hptr; assert(p->nfds > 0); - fd = p->fds[0]; + fd = p->fds[p->nfds - 1]; pconnRemoveFD(p, fd); commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); commSetTimeout(fd, -1, NULL, NULL); diff -rupN squid-2.5.STABLE4/src/pinger.c squid-2.5.STABLE5/src/pinger.c --- squid-2.5.STABLE4/src/pinger.c Thu Jan 11 17:37:20 2001 +++ squid-2.5.STABLE5/src/pinger.c Mon Dec 22 17:55:57 2003 @@ -1,6 +1,6 @@ /* - * $Id: pinger.c,v 1.46 2001/01/12 00:37:20 wessels Exp $ + * $Id: pinger.c,v 1.46.2.1 2003/12/23 00:55:57 hno Exp $ * * DEBUG: section 42 ICMP Pinger program * AUTHOR: Duane Wessels @@ -170,7 +170,7 @@ pingerSendEcho(struct in_addr to, int op echo = (icmpEchoData *) (icmp + 1); echo->opcode = (unsigned char) opcode; echo->tv = current_time; - icmp_pktsize += sizeof(icmpEchoData) - MAX_PAYLOAD; + icmp_pktsize += sizeof(struct timeval) + sizeof(char); if (payload) { if (len > MAX_PAYLOAD) len = MAX_PAYLOAD; diff -rupN squid-2.5.STABLE4/src/protos.h squid-2.5.STABLE5/src/protos.h --- squid-2.5.STABLE4/src/protos.h Sun Aug 10 15:04:47 2003 +++ squid-2.5.STABLE5/src/protos.h Wed Feb 4 10:42:28 2004 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.420.2.20 2003/08/10 21:04:47 hno Exp $ + * $Id: protos.h,v 1.420.2.22 2004/02/04 17:42:28 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -269,6 +269,7 @@ extern void fd_bytes(int fd, int len, un extern void fdFreeMemory(void); extern void fdDumpOpen(void); extern int fdNFree(void); +extern int fdUsageHigh(void); extern void fdAdjustReserved(void); extern fileMap *file_map_create(void); @@ -1273,7 +1274,7 @@ extern void helperStatefulFree(statefulh extern void helperStatefulReset(helper_stateful_server * srv); extern void helperStatefulReleaseServer(helper_stateful_server * srv); extern void *helperStatefulServerGetData(helper_stateful_server * srv); -extern helper_stateful_server *helperStatefulDefer(statefulhelper *); +extern helper_stateful_server *helperStatefulGetServer(statefulhelper *); diff -rupN squid-2.5.STABLE4/src/redirect.c squid-2.5.STABLE5/src/redirect.c --- squid-2.5.STABLE4/src/redirect.c Sat Jul 20 18:30:02 2002 +++ squid-2.5.STABLE5/src/redirect.c Sun Dec 14 06:40:47 2003 @@ -1,6 +1,6 @@ /* - * $Id: redirect.c,v 1.88.2.1 2002/07/21 00:30:02 hno Exp $ + * $Id: redirect.c,v 1.88.2.3 2003/12/14 13:40:47 hno Exp $ * * DEBUG: section 61 Redirector * AUTHOR: Duane Wessels @@ -100,23 +100,6 @@ redirectStart(clientHttpRequest * http, assert(http); assert(handler); debug(61, 5) ("redirectStart: '%s'\n", http->uri); - if (Config.Program.redirect == NULL) { - handler(data, NULL); - return; - } - if (Config.accessList.redirector) { - aclCheck_t ch; - memset(&ch, '\0', sizeof(ch)); - ch.src_addr = http->conn->peer.sin_addr; - ch.my_addr = http->conn->me.sin_addr; - ch.my_port = ntohs(http->conn->me.sin_port); - ch.request = http->request; - if (!aclCheckFast(Config.accessList.redirector, &ch)) { - /* denied -- bypass redirector */ - handler(data, NULL); - return; - } - } if (Config.onoff.redirector_bypass && redirectors->stats.queue_size) { /* Skip redirector if there is one request queued */ n_bypassed++; @@ -143,7 +126,7 @@ redirectStart(clientHttpRequest * http, r->orig_url, inet_ntoa(r->client_addr), fqdn, - r->client_ident, + r->client_ident[0] ? rfc1738_escape(r->client_ident) : dash_str, r->method_s); helperSubmit(redirectors, buf, redirectHandleReply, r); } diff -rupN squid-2.5.STABLE4/src/ssl_support.c squid-2.5.STABLE5/src/ssl_support.c --- squid-2.5.STABLE4/src/ssl_support.c Sat Feb 8 07:53:15 2003 +++ squid-2.5.STABLE5/src/ssl_support.c Thu Dec 11 00:53:11 2003 @@ -1,21 +1,21 @@ /* - * $Id: ssl_support.c,v 1.5.2.2 2003/02/08 14:53:15 hno Exp $ + * $Id: ssl_support.c,v 1.5.2.3 2003/12/11 07:53:11 wessels Exp $ * * AUTHOR: Benno Rice * DEBUG: section 83 SSL accelerator support * - * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ + * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- * - * Squid is the result of efforts by numerous individuals from the - * Internet community. Development is led by Duane Wessels of the - * National Laboratory for Applied Network Research and funded by the - * National Science Foundation. Squid is Copyrighted (C) 1998 by - * Duane Wessels and the University of California San Diego. Please - * see the COPYRIGHT file for full details. Squid incorporates - * software developed and/or copyrighted by other sources. Please see - * the CREDITS file for full details. + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sources; see the CREDITS file for full details. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -rupN squid-2.5.STABLE4/src/store.c squid-2.5.STABLE5/src/store.c --- squid-2.5.STABLE4/src/store.c Wed Aug 6 07:49:02 2003 +++ squid-2.5.STABLE5/src/store.c Wed Sep 24 16:30:22 2003 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.544.2.4 2003/08/06 13:49:02 hno Exp $ + * $Id: store.c,v 1.544.2.5 2003/09/24 22:30:22 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -443,6 +443,7 @@ storeSetPublicKey(StoreEntry * e) } #endif storeSetPublicKey(pe); + storeBuffer(pe); httpReplySwapOut(pe->mem_obj->reply, pe); storeBufferFlush(pe); storeTimestampsSet(pe); diff -rupN squid-2.5.STABLE4/src/structs.h squid-2.5.STABLE5/src/structs.h --- squid-2.5.STABLE4/src/structs.h Fri Sep 12 14:30:16 2003 +++ squid-2.5.STABLE5/src/structs.h Wed Feb 4 10:42:28 2004 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.408.2.14 2003/09/12 20:30:16 hno Exp $ + * $Id: structs.h,v 1.408.2.23 2004/02/04 17:42:28 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -400,6 +400,7 @@ struct _SquidConfig { struct { time_t read; time_t lifetime; + time_t forward; time_t connect; time_t peer_connect; time_t request; @@ -592,6 +593,7 @@ struct _SquidConfig { int vary_ignore_expire; int pipeline_prefetch; int request_entities; + int detect_broken_server_pconns; } onoff; acl *aclList; struct { @@ -626,6 +628,7 @@ struct _SquidConfig { char *anon_user; int passive; int sanitycheck; + int telnet; } Ftp; refresh_t *Refresh; struct _cacheSwap { @@ -635,6 +638,7 @@ struct _SquidConfig { } cacheSwap; struct { char *directory; + int use_short_names; } icons; char *errorDirectory; struct { @@ -965,6 +969,8 @@ struct _http_state_flags { unsigned int proxying:1; unsigned int keepalive:1; unsigned int only_if_cached:1; + unsigned int keepalive_broken:1; + unsigned int abuse_detected:1; }; struct _HttpStateData { @@ -979,6 +985,7 @@ struct _HttpStateData { int fd; http_state_flags flags; FwdState *fwd; + char *body_buf; }; struct _icpUdpData { @@ -1951,7 +1958,7 @@ struct _FwdServer { }; struct _FwdState { - int client_fd; + int client_fd; /* XXX unnecessary */ StoreEntry *entry; request_t *request; FwdServer *servers; @@ -1959,6 +1966,7 @@ struct _FwdState { ErrorState *err; time_t start; int n_tries; + int origin_tries; #if WIP_FWD_LOG http_status last_status; #endif @@ -1994,8 +2002,6 @@ struct _helper_request { struct _helper_stateful_request { char *buf; HLPSCB *callback; - int placeholder; /* if 1, this is a dummy request waiting for a stateful helper - * to become available for deferred requests.*/ void *data; }; @@ -2013,6 +2019,7 @@ struct _helper { int requests; int replies; int queue_size; + int max_queue_size; int avg_svc_time; } stats; time_t last_restart; @@ -2028,12 +2035,13 @@ struct _helper_stateful { int ipc_type; MemPool *datapool; HLPSAVAIL *IsAvailable; - HLPSONEQ *OnEmptyQueue; + HLPSRESET *Reset; time_t last_queue_warn; struct { int requests; int replies; int queue_size; + int max_queue_size; int avg_svc_time; } stats; time_t last_restart; @@ -2075,7 +2083,6 @@ struct _helper_stateful_server { struct timeval dispatch_time; struct timeval answer_time; dlink_node link; - dlink_list queue; statefulhelper *parent; helper_stateful_request *request; struct _helper_stateful_flags { @@ -2083,16 +2090,13 @@ struct _helper_stateful_server { unsigned int busy:1; unsigned int closing:1; unsigned int shutdown:1; - stateful_helper_reserve_t reserved; + unsigned int reserved:1; } flags; struct { int uses; int submits; int releases; - int deferbyfunc; - int deferbycb; } stats; - int deferred_requests; /* current number of deferred requests */ void *data; /* State data used by the calling routines */ }; diff -rupN squid-2.5.STABLE4/src/typedefs.h squid-2.5.STABLE5/src/typedefs.h --- squid-2.5.STABLE4/src/typedefs.h Sun May 11 11:30:13 2003 +++ squid-2.5.STABLE5/src/typedefs.h Wed Feb 4 10:42:29 2004 @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.132.2.2 2003/05/11 17:30:13 hno Exp $ + * $Id: typedefs.h,v 1.132.2.4 2004/02/04 17:42:29 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -249,11 +249,11 @@ typedef void OBJH(StoreEntry *); typedef void SIGHDLR(int sig); typedef void STVLDCB(void *, int, int); typedef void HLPCB(void *, char *buf); -typedef stateful_helper_callback_t HLPSCB(void *, void *lastserver, char *buf); +typedef void HLPSCB(void *, void *lastserver, char *buf); typedef int HLPSAVAIL(void *); -typedef void HLPSONEQ(void *); +typedef void HLPSRESET(void *); typedef void HLPCMDOPTS(int *argc, char **argv); -typedef void IDNSCB(void *, rfc1035_rr *, int); +typedef void IDNSCB(void *, rfc1035_rr *, int, const char *); typedef void STINIT(SwapDir *); typedef void STNEWFS(SwapDir *);