packages feed

ngx-export-tools-extra 1.2.11 → 1.2.12

raw patch · 4 files changed

+24/−5 lines, 4 filesdep ~http-client-brread-timeoutPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: http-client-brread-timeout

API changes (from Hackage documentation)

- NgxExport.Tools.Aggregate: newtype () => CInt
+ NgxExport.Tools.Aggregate: newtype CInt
- NgxExport.Tools.Aggregate: newtype () => CUInt
+ NgxExport.Tools.Aggregate: newtype CUInt
- NgxExport.Tools.PCRE: type SubPasteF = -- | The full match ByteString -> -- | List of captures [ByteString] -> ByteString
+ NgxExport.Tools.PCRE: type SubPasteF = ByteString -> [ByteString] -> ByteString

Files

Changelog.md view
@@ -1,3 +1,9 @@+### 1.2.12++- Module *NgxExport.Tools.Resolve*.+  + Resolve non-canonical names in *collectA*. Alias records chains of depth up+    to 12 are supported.+ ### 1.2.11  - Module *NgxExport.Tools.Resolve*.
LICENSE view
@@ -1,7 +1,7 @@ The following license covers this documentation, and the source code, except where otherwise indicated. -Copyright 2019-2024, Alexey Radkov. All rights reserved.+Copyright 2019-2026, Alexey Radkov. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
NgxExport/Tools/Resolve.hs view
@@ -5,7 +5,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  NgxExport.Tools.Resolve--- Copyright   :  (c) Alexey Radkov 2022-2024+-- Copyright   :  (c) Alexey Radkov 2022-2026 -- License     :  BSD-style -- -- Maintainer  :  alexey.radkov@gmail.com@@ -425,6 +425,9 @@  -- | Queries an /A/ record for the given domain name. --+-- If the domain name happens to be non-canonical, this function tries to+-- resolve the chain of alias records of maximum depth up to 12.+-- -- Returns a list of IP addresses and the minimum value of their TTLs. If the -- list is empty, then the returned TTL value gets taken from the first -- argument.@@ -433,8 +436,18 @@     -> Name                     -- ^ Domain name     -> IO (TTL, [IPv4]) collectA lTTL (Name n) = do-    !srv <- queryA $ Name $ C8.takeWhile (':' /=) n+    !srv <- collectName (0 :: Int) $ Name $ C8.takeWhile (':' /=) n     return (minimumTTL lTTL $ map fst srv, map snd srv)+    where collectName 12 _ = return []+          collectName i n' = do+              addrs <- queryA n'+              case addrs of+                  [] -> do+                      cn <- queryCNAME n'+                      case cn of+                          (_, cn') : _ -> collectName (succ i) cn'+                          _ -> return addrs+                  _ -> return addrs  -- | Queries an /SRV/ record for the given service name. --
ngx-export-tools-extra.cabal view
@@ -1,5 +1,5 @@ name:                       ngx-export-tools-extra-version:                    1.2.11+version:                    1.2.12 synopsis:                   More extra tools for Nginx Haskell module description:                More extra tools for         <https://github.com/lyokha/nginx-haskell-module Nginx Haskell module>.@@ -10,7 +10,7 @@ author:                     Alexey Radkov <alexey.radkov@gmail.com> maintainer:                 Alexey Radkov <alexey.radkov@gmail.com> stability:                  stable-copyright:                  2019-2024 Alexey Radkov+copyright:                  2019-2026 Alexey Radkov category:                   Network build-type:                 Simple cabal-version:              1.20