Coder Social home page Coder Social logo

io-streams-haproxy's People

Contributors

23skidoo avatar andreasabel avatar cydparser avatar dmjio avatar felixonmars avatar gregorycollins avatar hvr avatar mightybyte avatar peterbecich avatar phadej avatar sjakobi avatar turbomack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

io-streams-haproxy's Issues

Not in scope: data constructor `N.SockAddrUnix'

Windows 8.1 , 64bit, GHC 7.8.3

trying to build master

Failed to install io-streams-haproxy-1.0.0.0
Last 10 lines of the build log ( C:\Users\XXX\AppData\Roaming\cabal\logs\io-streams-haproxy-1.0.0.0.log ):
    Not in scope: data constructor `N.SockAddrUnix'
    Perhaps you meant one of these:
      `N.SockAddrInet' (imported from Network.Socket),
      `N.SockAddrInet6' (imported from Network.Socket)

src\System\IO\Streams\Network\HAProxy.hs:357:19:
    Not in scope: data constructor `N.SockAddrUnix'
    Perhaps you meant one of these:
      `N.SockAddrInet' (imported from Network.Socket),
      `N.SockAddrInet6' (imported from Network.Socket)
cabal: Error: some packages failed to install:
io-streams-haproxy-1.0.0.0 failed during the building phase. The exception
was:
ExitFailure 1

test/blackbox_local fails on mipsel

Hi!

test/blackbox_local fails on mipsel with the following error:

HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "System.IO.Streams.Network.HAProxy.Tests", srcLocFile = "test/System/IO/Streams/Network/HAProxy/Tests.hs", srcLocStartLine = 178, srcLocStartCol = 9, srcLocEndLine = 178, srcLocEndCol = 36})) (ExpectedButGot (Just "type") "Stream" "Datagram")

You can find complete logs here. Please let me know if I can help debugging this.

Build fails

GHC 7.8.3, Cabal 1.20, Haskell Platform 2014.2.0.0, Windows

Error:

Configuring io-streams-haproxy-1.0.0.0...
Building io-streams-haproxy-1.0.0.0...
Failed to install io-streams-haproxy-1.0.0.0
Build log ( C:\projects\snap\.sandbox\logs\io-streams-haproxy-1.0.0.0.log ):
Building io-streams-haproxy-1.0.0.0...
Preprocessing library io-streams-haproxy-1.0.0.0...
[2 of 2] Compiling System.IO.Streams.Network.HAProxy ( src\System\IO\Streams\Network\HAProxy.hs, dist\dist-sandbox-d77347ee\build\System\IO\Streams\Network\HAProxy.o )

src\System\IO\Streams\Network\HAProxy.hs:320:18:
    Not in scope: data constructor `N.SockAddrUnix'
    Perhaps you meant one of these:
      `N.SockAddrInet' (imported from Network.Socket),
      `N.SockAddrInet6' (imported from Network.Socket)

src\System\IO\Streams\Network\HAProxy.hs:321:18:
    Not in scope: data constructor `N.SockAddrUnix'
    Perhaps you meant one of these:
      `N.SockAddrInet' (imported from Network.Socket),
      `N.SockAddrInet6' (imported from Network.Socket)

src\System\IO\Streams\Network\HAProxy.hs:350:19:
    Not in scope: data constructor `N.SockAddrUnix'
    Perhaps you meant one of these:
      `N.SockAddrInet' (imported from Network.Socket),
      `N.SockAddrInet6' (imported from Network.Socket)
cabal.exe: Error: some packages failed to install:
io-streams-haproxy-1.0.0.0 failed during the building phase. The exception
was:
ExitFailure 1

Support for GHC 9.0.1

The latest release requires base < 4.15, so at least that bound needs to be relaxed.

Compatibility with GHC 9.2

As far as I can tell, io-streams-haproxy-1.0.1.0 is already buildable with GHC-9.2 when the upper bounds on base and bytestring are relaxed. Could you adjust these bounds?

inaccurate version bounds in .cabal file

The following compile error occurs with GHC 7.2 (base-4.4), compilation with GHC 7.4 (base-4.5) is fine though:

[1 of 2] Compiling System.IO.Streams.Network.Internal.Address ( src/System/IO/Streams/Network/Internal/Address.hs, dist/dist-sandbox-f89bdc8f/build/System/IO/Streams/Network/Internal/Address.o )
[2 of 2] Compiling System.IO.Streams.Network.HAProxy ( src/System/IO/Streams/Network/HAProxy.hs, dist/dist-sandbox-f89bdc8f/build/System/IO/Streams/Network/HAProxy.o )

src/System/IO/Streams/Network/HAProxy.hs:44:62:
    Module `Data.Bits' does not export `unsafeShiftR'
xcabal: Error: some packages failed to install:
io-streams-haproxy-1.0.0.0 failed during the building phase. The exception
was:
ExitFailure 1

I've edited in a base >= 4.5 bound at https://hackage.haskell.org/package/io-streams-haproxy-1.0.0.0/revisions/

getPeerName: invalid argument (Transport endpoint is not connected)

I'm using code like the following, which causes problems with haproxys default keepalive check which consists in sending a PROXY header and closing the connection right ahead:

(s,sa) <- accept sock
(inst,outst) <- socketToStreams s
localPInfo <- socketToProxyInfo s

The problem is that by the time getPeerName is called, the connection is already closed, so the system calls fails.

However, if I there was a function which allowed me to pass in the sa I already got from the accept, i.e.

socketToProxyInfo :: N.Socket -> IO ProxyInfo
socketToProxyInfo s = socketToProxyInfoWithPeerName s =<< N.getPeerName s

socketToProxyInfoWithPeerName :: N.Socket -> N.SockAddr -> IO ProxyInfo
socketToProxyInfoWithPeerName s sa = do
    da <- N.getSocketName s
    let (N.MkSocket _ _ !sty _ _) = s
    return $! makeProxyInfo sa da (addrFamily sa) sty

I can write the code like below and avoid calling getPeerName (and thus avoid the failure):

(s,sa) <- accept sock
(inst,outst) <- socketToStreams s
localPInfo <- socketToProxyInfoWithPeerName s sa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.