Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_url_lossy() does not generate a valid postgres URL for ssl-mode #3255

Closed
Dunedubby opened this issue Jun 1, 2024 · 1 comment · Fixed by #3285
Closed

to_url_lossy() does not generate a valid postgres URL for ssl-mode #3255

Dunedubby opened this issue Jun 1, 2024 · 1 comment · Fixed by #3285
Labels

Comments

@Dunedubby
Copy link

Dunedubby commented Jun 1, 2024

Bug Description

PgConnectOptions::to_url_lossy() (and build_url()) are using incorrect syntax for generating a Postgres URL

Minimal Reproduction

Compare this and this. It seems like it should be sslmode instead of ssl-mode and lowercase e.g. require instead of REQUIRED for the string conversion when building a Postgres-compatible URL.

Info

  • SQLx version: 0.7.4
  • SQLx features enabled: "postgres", "chrono", "uuid", "macros", "runtime-tokio", "runtime-tokio-rustls"
  • Database server and version: Postgres
  • Operating system: Ubuntu 22.04
  • rustc --version: 1.78.0
@Dunedubby Dunedubby added the bug label Jun 1, 2024
@lily-mosquitoes
Copy link
Contributor

Seems this was an oversight on my part, I'll fix it.

Likely the options names should not be case sensitive but the spelling was incorrect indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants