dns 2.0.7 → 2.0.8
raw patch · 4 files changed
+14/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Changelog +4/−0
- Network/DNS/Decode.hs +5/−2
- Network/DNS/Encode.hs +4/−1
- dns.cabal +1/−1
Changelog view
@@ -1,3 +1,7 @@+2.0.8+ - Better handling of encoding and decoding the "root" domain ".". [#45](https://github.com/kazu-yamamoto/dns/pull/45)+2.0.7+ - Add length checks for A and AAAA records. [#43](https://github.com/kazu-yamamoto/dns/pull/43) 2.0.6 - Adding Ord instance. [#41](https://github.com/kazu-yamamoto/dns/pull/41) - Adding DNSSEC-related RRTYPEs [#40](https://github.com/kazu-yamamoto/dns/pull/40)
Network/DNS/Decode.hs view
@@ -269,7 +269,7 @@ let n = getValue c -- Syntax hack to avoid using MultiWayIf case () of- _ | c == 0 -> return ""+ _ | c == 0 -> return "." -- Perhaps the root domain? _ | isPointer c -> do d <- getInt8 let offset = n * 256 + d@@ -285,7 +285,10 @@ _ | otherwise -> do hs <- getNByteString n ds <- decodeDomain- let dom = hs `BS.append` "." `BS.append` ds+ let dom =+ case ds of -- avoid trailing ".."+ "." -> hs `BS.append` "."+ _ -> hs `BS.append` "." `BS.append` ds push pos dom return dom where
Network/DNS/Encode.hs view
@@ -201,9 +201,12 @@ ---------------------------------------------------------------- +rootDomain :: Domain+rootDomain = BS.pack "."+ encodeDomain :: Domain -> SPut encodeDomain dom- | BS.null dom = put8 0+ | (BS.null dom || dom == rootDomain) = put8 0 | otherwise = do mpos <- wsPop dom cur <- gets wsPosition
dns.cabal view
@@ -1,5 +1,5 @@ Name: dns-Version: 2.0.7+Version: 2.0.8 Author: Kazu Yamamoto <kazu@iij.ad.jp> Maintainer: Kazu Yamamoto <kazu@iij.ad.jp> License: BSD3