www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Edmundsson <ni...@ing.umu.se>
Subject Re: mod_speling/4677: Patch: Only correct spelling if no Referer
Date Fri, 08 Oct 1999 23:50:01 GMT
The following reply was made to PR mod_speling/4677; it has been noted by GNATS.

From: Niklas Edmundsson <nikke@ing.umu.se>
To: apbugs@hyperreal.org, apache-bugdb@apache.org
Cc: Magnus Jonsson <bigfoot@acc.umu.se>
Subject: Re: mod_speling/4677: Patch: Only correct spelling if no Referer
Date: Sat, 9 Oct 1999 01:49:13 +0200 (CEST)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
   Send mail to mime@docserver.cac.washington.edu for more info.
 
 ---276672139-1103900354-939426553=:5589
 Content-Type: TEXT/PLAIN; charset=ISO-8859-1
 Content-Transfer-Encoding: 8BIT
 
 
 Attached is a patch for mod_speling.c in apache 1.3.6 and 1.3.9 that
 introduces a config-option to only check the spelling of an URL when
 there is no Referer-header, ie only when the user has entered the URL
 manually.
 
 This makes it possible to have mod_speling enabled on a
 production-server without having users that have pages with misspelled
 URL's causing the server to fix the spelling very often (which can be
 very annoying if you have your users' home-directories mounted via
 nfs).
 
 It introduces the option CheckSpellingWithReferer (which defaults to
 on for no change in the default behaviour) which, when set to off,
 disables the check when there is no Referer-header.
 
 We have used this patch on our production-server running Apache 1.3.6
 for a while now, it works for us :-)
 
 All credits for this patch should go to Magnus Jonsson
 <bigfoot@acc.umu.se>.
 
 
 With hopes of getting this included in the main Apache distribution.
 
 /Nikke - SysAdmin at the Academic Computer Club, Umeň University, Sweden
 -- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n,ing}.umu.se    |   nikke@ing.umu.se
 ---------------------------------------------------------------------------
  Printers do it without wrinkling the sheets.
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 ---276672139-1103900354-939426553=:5589
 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="apache-1.3-mod_speling.patch"
 Content-Transfer-Encoding: BASE64
 Content-ID: <Pine.LNX.3.96.991009014913.5589L@thelma.ing.umu.se>
 Content-Description: 
 
 LS0tIC4uLy4uLy4uLy4uL2Rpc3Qvc3JjL21vZHVsZXMvc3RhbmRhcmQvbW9k
 X3NwZWxpbmcuYwlNb24gSmFuIDI1IDE5OjEyOjQxIDE5OTkNCisrKyBtb2Rf
 c3BlbGluZy5jCVNhdCBPY3QgIDkgMDE6NDQ6MTQgMTk5OQ0KQEAgLTg3LDYg
 Kzg3LDcgQEANCiANCiB0eXBlZGVmIHN0cnVjdCB7DQogICAgIGludCBlbmFi
 bGVkOw0KKyAgICBpbnQgY2hlY2tzcGVsbGluZ3dpdGhyZWZlcmVyOw0KIH0g
 c3Bjb25maWc7DQogDQogLyoNCkBAIC0xMDMsNiArMTA0LDcgQEANCiAgICAg
 c3Bjb25maWcgKmNmZyA9IGFwX3BjYWxsb2MocCwgc2l6ZW9mKHNwY29uZmln
 KSk7DQogDQogICAgIGNmZy0+ZW5hYmxlZCA9IDA7DQorICAgIGNmZy0+Y2hl
 Y2tzcGVsbGluZ3dpdGhyZWZlcmVyID0gMTsNCiAgICAgcmV0dXJuIGNmZzsN
 CiB9DQogDQpAQCAtMTI0LDI0ICsxMjYsMTcgQEANCiB9DQogDQogLyoNCi0g
 KiBIYW5kbGVyIGZvciB0aGUgQ2hlY2tTcGVsbGluZyBkaXJlY3RpdmUsIHdo
 aWNoIGlzIEZMQUcuDQotICovDQotc3RhdGljIGNvbnN0IGNoYXIgKnNldF9z
 cGVsaW5nKGNtZF9wYXJtcyAqY21kLCB2b2lkICptY29uZmlnLCBpbnQgYXJn
 KQ0KLXsNCi0gICAgc3Bjb25maWcgKmNmZyA9IChzcGNvbmZpZyAq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
 ZXJlciBpcyBvZmYsIGNoZWNrIGZvciAiUmVmZXJlciIgKi8NCisgICAgaWYg
 KCFjZmctPmNoZWNrc3BlbGxpbmd3aXRocmVmZXJlciAmJiBsb29rdXBfaGVh
 ZGVyKHIsICJSZWZlcmVyIikpIHsNCisgICAgICAgIHJldHVybiBERUNMSU5F
 RDsNCisgICAgfQ0KKw0KICAgICAvKiBXZSd2ZSBhbHJlYWR5IGdvdCBhIGZp
 bGUgb2Ygc29tZSBraW5kIG9yIGFub3RoZXIgKi8NCiAgICAgaWYgKHItPnBy
 b3h5cmVxIHx8IChyLT5maW5mby5zdF9tb2RlICE9IDApKSB7DQogICAgICAg
 ICByZXR1cm4gREVDTElORUQ7DQo=
 ---276672139-1103900354-939426553=:5589--

Mime
View raw message