[Zope-dev] patches to make ZServer's http_request subclassable
Brian Takashi Hooper
brian@garage.co.jp
Fri, 28 Jul 2000 19:32:15 +0900
--RnJpLCAyOCBKdWwgMjAwMCAxOTozMjoxNSArMDkwMA==
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
Hi all -
I made a couple of patches to ZServer (medusa, actually) to make
medusa'a http_request objects subclassable... the motivation is to make
customizing medusa / ZServer's logging easier to do just overriding
http_request's log() method in a subclass.
Patches are attached to this message, suggestions welcome!
--Brian Hooper
Tokyo, Japan
--RnJpLCAyOCBKdWwgMjAwMCAxOTozMjoxNSArMDkwMA==
Content-Type: application/octet-stream; name="medusa-2.1.6.patch"
Content-Disposition: attachment;
filename="medusa-2.1.6.patch"
Content-Transfer-Encoding: base64
KioqIG1lZHVzYS5vcmlnL2h0dHBfc2VydmVyLnB5CUZyaSBKdWwgMjggMTk6MDE6NDAgMjAwMA0K
LS0tIG1lZHVzYS9odHRwX3NlcnZlci5weQlXZWQgSnVsIDEyIDE4OjA4OjU4IDIwMDANCioqKioq
KioqKioqKioqKg0KKioqIDY4LDc0ICoqKioNCiAgCQkJJ1NlcnZlcicJOiAnTWVkdXNhLyVzJyAl
IFZFUlNJT05fU1RSSU5HLA0KICAJCQknRGF0ZScJCTogaHR0cF9kYXRlLmJ1aWxkX2h0dHBfZGF0
ZSAodGltZS50aW1lKCkpDQogIAkJCX0NCiEgCQlzZWxmLnJlcXVlc3RfbnVtYmVyID0gaHR0cF9y
ZXF1ZXN0LnJlcXVlc3RfY291bnRlci5pbmNyZW1lbnQoKQ0KICAJCXNlbGYuX3NwbGl0X3VyaSA9
IE5vbmUNCiAgCQlzZWxmLl9oZWFkZXJfY2FjaGUgPSB7fQ0KICANCi0tLSA2OCw3NCAtLS0tDQog
IAkJCSdTZXJ2ZXInCTogJ01lZHVzYS8lcycgJSBWRVJTSU9OX1NUUklORywNCiAgCQkJJ0RhdGUn
CQk6IGh0dHBfZGF0ZS5idWlsZF9odHRwX2RhdGUgKHRpb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dWVzdCwgY29tbWFuZCwgdXJpLCB2ZXJzaW9u
LCBoZWFkZXIpDQogIAkJCXNlbGYucmVxdWVzdF9jb3VudGVyLmluY3JlbWVudCgpDQogIAkJCXNl
bGYuc2VydmVyLnRvdGFsX3JlcXVlc3RzLmluY3JlbWVudCgpDQogIA0KLS0tIDQ3Myw0ODYgLS0t
LQ0KICAJCQkJCQkJJyVzICVzICVzJyAlIChwYXJ0c1swXSwgcGFydHNbMV0sIHBhcnRzWy0xXSkp
DQogIAkJCQlleGNlcHQ6DQogIAkJCQkJc2VsZi5sb2dfaW5mbygnQmFkIEhUVFAgcmVxdWVzdDog
JXMnICUgcmVxdWVzdCwgJ2Vycm9yJykNCiEgCQkJCQlyID0gc2VsZi5yZXF1ZXN0X2NsYXNzIChz
ZWxmLCByZXF1ZXN0LCANCiAgCQkJCQkJCU5vbmUsIE5vbmUsIE5vbmUsIGpvaW5faGVhZGVycyhs
aW5lc1sxOl0pKQ0KICAJCQkJCXIuZXJyb3IoNDAwKQ0KICAJCQkJCXJldHVybg0KICAJCQloZWFk
ZXIgPSBqb2luX2hlYWRlcnMgKGxpbmVzWzE6XSkNCiAgDQohIAkJCXIgPSBzZWxmLnJlcXVlc3Rf
Y2xhc3MgKHNlbGYsIHJlcXVlc3QsIGNvbW1hbmQsIHVyaSwgdmVyc2lvbiwNCiEgCQkJCQkJCQkJ
aGVhZGVyKQ0KICAJCQlzZWxmLnJlcXVlc3RfY291bnRlci5pbmNyZW1lbnQoKQ0KICAJCQlzZWxm
LnNlcnZlci50b3RhbF9yZXF1ZXN0cy5pbmNyZW1lbnQoKQ0K
--RnJpLCAyOCBKdWwgMjAwMCAxOTozMjoxNSArMDkwMA==
Content-Type: application/octet-stream; name="medusa-2.2.0.patch"
Content-Disposition: attachment;
filename="medusa-2.2.0.patch"
Content-Transfer-Encoding: base64
KioqIG1lZHVzYS5vcmlnL2h0dHBfc2VydmVyLnB5CUZyaSBKdWwgMjggMTk6MTQ6MzMgMjAwMA0K
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