ports/153503: Patch to add PostgreSQL health check to haproxy 1.4
Rauf Kuliyev
rauf at kuliyev.com
Tue Dec 28 20:20:10 UTC 2010
The following reply was made to PR ports/153503; it has been noted by GNATS.
From: Rauf Kuliyev <rauf at kuliyev.com>
To: bug-followup at freebsd.org, rauf at kuliyev.com
Cc:
Subject: Re: ports/153503: Patch to add PostgreSQL health check to haproxy 1.4
Date: Tue, 28 Dec 2010 23:47:11 +0400
--0016364ee404ddf94c04987db836
Content-Type: multipart/alternative; boundary=0016364ee404ddf94104987db834
--0016364ee404ddf94104987db834
Content-Type: text/plain; charset=UTF-8
The patch has not been attached. Here it is.
Regards,
Rauf
--0016364ee404ddf94104987db834
Content-Type: text/html; charset=UTF-8
The patch has not been attached. Here it is.<div><br></div><div>Regards,</div><div>Rauf</div>
--0016364ee404ddf94104987db834--
--0016364ee404ddf94c04987db836
Content-Type: text/plain; charset=US-ASCII; name="patch-haproxy-pgsql.txt"
Content-Disposition: attachment; filename="patch-haproxy-pgsql.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gi97jx8m0
ZGlmZiAtcnVOIGhhcHJveHkub3JpZy9maWxlcy9wYXRjaC1wZ3NxbCBoYXByb3h5L2ZpbGVzL3Bh
dGNoLXBnc3FsCi0tLSBoYXByb3h5Lm9yaWcvZmlsZXMvcGF0Y2gtcGdzcWwJMTk3MC0wMS0wMSAw
NDowMDowMC4wMDAwMDAwMDAgKzA0MDAKKysrIGhhcHJveHkvZmlsZXMvcGF0Y2gtcGdzcWwJMjAx
MC0xMi0yOCAwOTozMDo1MC4wMDAwMDAwMDAgKzA0MDAKQEAgLTAsMCArMSwxMjIgQEAKKy0tLSBz
cmMvY2hlY2tzLmMub3JpZwkyMDEwLTExLTI5IDEwOjM2OjQ3LjAwMDAwMDAwMCArMDQwMAorKysr
IHNyYy9jaGVja3MuYwkyMDEwLTEyLTI4IDA5OjI4OjMzLjAwMDAwMDAwMCArMDQwMAorQEAgLTc0
Nyw2ICs3NDcsNyBAQAor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weDAwMjAwMDAwICAgICAgLyogcHJldGVuZCB3ZSBkbyBrZWVwLWFsaXZlIHdp
dGggc2VydmVyIGV2ZW50aG91Z2ggd2UgY2xvc2UgKi8KKyAjZGVmaW5lIFBSX08yX0xEQVBfQ0hL
ICAweDAwNDAwMDAwICAgICAgLyogdXNlIExEQVAgY2hlY2sgZm9yIHNlcnZlciBoZWFsdGggKi8K
KysjZGVmaW5lIFBSX08yX1BHU1FMX0NISyAweDAwODAwMDAwICAgICAgLyogdXNlIFBHU1FMIGNo
ZWNrIGZvciBzZXJ2ZXIgaGVhbHRoICovCisgCisgI2RlZmluZSBQUl9PMl9FWFBfTk9ORSAgMHgw
MDAwMDAwMCAgICAgIC8qIGh0dHAtY2hlY2sgOiBubyBleHBlY3QgcnVsZSAqLworICNkZWZpbmUg
UFJfTzJfRVhQX1NUUyAgIDB4MDA4MDAwMDAgICAgICAvKiBodHRwLWNoZWNrIGV4cGVjdCBzdGF0
dXMgKi8K
--0016364ee404ddf94c04987db836--
More information about the freebsd-ports-bugs
mailing list