0.8.4 release (#3819)

* chore: prepare 0.8.4 release

* fix(postgres): send `limit: 0` for all `Execute` messages

fixes #3673

* fix: let `CertificateInput::from` infer any PEM-encoded document

https://github.com/launchbadge/sqlx/pull/3809#issuecomment-2800293813

* doc: improve documentation of `PgConnectOptions`

fixes #3740

* chore: update CHANGELOG from PR
This commit is contained in:
Austin Bonander
2025-04-13 21:55:14 -07:00
committed by GitHub
parent 154878547e
commit f9084035d7
9 changed files with 383 additions and 134 deletions

View File

@@ -25,11 +25,12 @@ pub enum CertificateInput {
impl From<String> for CertificateInput {
fn from(value: String) -> Self {
// Leading and trailing whitespace/newlines
let trimmed = value.trim();
// Some heuristics according to https://tools.ietf.org/html/rfc7468
if trimmed.starts_with("-----BEGIN CERTIFICATE-----")
&& trimmed.contains("-----END CERTIFICATE-----")
{
// Heuristic for PEM encoded inputs:
// https://tools.ietf.org/html/rfc7468
if trimmed.starts_with("-----BEGIN") && trimmed.ends_with("-----") {
CertificateInput::Inline(value.as_bytes().to_vec())
} else {
CertificateInput::File(PathBuf::from(value))