[PATCH] Apache 2.0 Proxy & Windows Update

[PATCH] Apache 2.0 Proxy & Windows Update

am 24.03.2003 11:29:23 von Sami.Tikka

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2F1F0.3CF20F7B
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Apache2 proxy seems to drop Content-Length header from replies to HEAD
requests. This is very bad for Microsoft's Windows Update system (and =
against
HTTP spec). The problem is caused by CONTENT_LENGTH output filter =
setting
Content-Length header to zero because there is no body data. Later on =
Apache
removes Content-Length header if it has value 0.

The attached patch fixes the problem in CONTENT_LENGTH output filter by
preventing it from modifying the content length of a reply to HEAD =
request.

The attached patch is against HEAD of APACHE_2_0_BRANCH as of this =
morning.

--=20
Sami Tikka, senior software engineer, F-Secure Corporation
tel: +358 9 2520 5115, fax: +358 9 2520 5015
http://www.F-Secure.com
F-Secure: Securing the Mobile Enterprise

------_=_NextPart_001_01C2F1F0.3CF20F7B
Content-Type: application/octet-stream;
name="windows-update.diff"
Content-Transfer-Encoding: base64
Content-Description: windows-update.diff
Content-Disposition: attachment;
filename="windows-update.diff"

SW5kZXg6IHByb3RvY29sLmMNCj09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBmaWxlOiAvaG9t ZS9jdnNwdWJsaWMv
aHR0cGQtMi4wL3NlcnZlci9wcm90b2NvbC5jLHYNCnJldHJpZXZpbmcgcmV2 aXNpb24gMS4xMjEu
Mi4yDQpkaWZmIC11IC1yMS4xMjEuMi4yIHByb3RvY29sLmMNCi0tLSBwcm90 b2NvbC5jCTMgRmVi
IDIwMDMgMTc6MzI6MDAgLTAwMDAJMS4xMjEuMi4yDQorKysgcHJvdG9jb2wu YwkyNCBNYXIgMjAw
MyAxMDoxMDo0OSAtMDAwMA0KQEAgLTEyOTAsNyArMTI5MCw3IEBADQogICAg ICAqIFdlIGNhbiBv
bmx5IHNldCBhIEMtTCBpbiB0aGUgcmVzcG9uc2UgaGVhZGVyIGlmIHdlIGhh dmVuJ3QgYWxyZWFk
eQ0KICAgICAgKiBzZW50IGFueSBidWNrZXRzIG9uIHRvIHRoZSBuZXh0IG91 dHB1dCBmaWx0ZXIg
Zm9yIHRoaXMgcmVxdWVzdC4NCiAgICAgICovDQotICAgIGlmIChjdHgtPmRh dGFfc2VudCA9PSAw
ICYmIGVvcykgew0KKyAgICBpZiAoY3R4LT5kYXRhX3NlbnQgPT0gMCAmJiBl b3MgJiYgIXItPmhl
YWRlcl9vbmx5KSB7DQogICAgICAgICBhcF9zZXRfY29udGVudF9sZW5ndGgo ciwgci0+Ynl0ZXNf
c2VudCk7DQogICAgIH0NCiANCg0K

------_=_NextPart_001_01C2F1F0.3CF20F7B--