pqi-native 1.0.1.6 → 1.0.1.7
raw patch · 3 files changed
+12/−6 lines, 3 filesdep ~pqi-conformancePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: pqi-conformance
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- pqi-native.cabal +2/−2
- src/library/Pqi/Native/Connection.hs +4/−4
CHANGELOG.md view
@@ -1,3 +1,9 @@+# v1.0.1.7++## Fixes++- Fixed a `postgresql://` URI conninfo with a percent-encoded Unix-socket host (e.g. `%2ftmp%2f...`) being passed through to `host` still percent-encoded instead of decoded. `parseUri`'s `host`/`port` splitter decoded every other URI component (`user`, `password`, `dbname`, query params) but forwarded the raw, undecoded host bytes. Caught by the `pqi-conformance` differential spec `Pqi.Conformance.Operation.Connectdb.UnixSocketUri`.+ # v1.0.1.6 ## Fixes
pqi-native.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: pqi-native-version: 1.0.1.6+version: 1.0.1.7 category: Database, PostgreSQL synopsis: Native (pure-Haskell) adapter for pqi description:@@ -158,5 +158,5 @@ build-depends: base >=4.11 && <5, hspec >=2.11 && <2.12,- pqi-conformance ^>=1.0.6,+ pqi-conformance ^>=1.0.7, pqi-native,
src/library/Pqi/Native/Connection.hs view
@@ -231,15 +231,15 @@ Just close -> let h = ByteString.take close (ByteString.drop 1 hostport) portStr = ByteString.drop 2 (ByteString.drop close hostport)- in (h, readPort portStr)- Nothing -> (hostport, 5432)+ in (pctDecode h, readPort portStr)+ Nothing -> (pctDecode hostport, 5432) | otherwise = case ByteString.elemIndexEnd 0x3a hostport of Just c -> let h = ByteString.take c hostport p = ByteString.drop (c + 1) hostport- in if ByteString.null h then (dfltHost, readPort p) else (h, readPort p)+ in if ByteString.null h then (dfltHost, readPort p) else (pctDecode h, readPort p) Nothing ->- (defaultIfEmpty dfltHost hostport, 5432)+ (defaultIfEmpty dfltHost (pctDecode hostport), 5432) readPort bs = maybe 5432 fst (ByteString.Char8.readInt bs)