wai-handler-launch 1.3.1.2 → 1.3.1.3
raw patch · 2 files changed
+7/−7 lines, 2 filesdep ~blaze-builder-conduitdep ~conduitdep ~zlib-conduit
Dependency ranges changed: blaze-builder-conduit, conduit, zlib-conduit
Files
Network/Wai/Handler/Launch.hs view
@@ -60,11 +60,11 @@ toInsert :: S.ByteString toInsert = "<script>setInterval(function(){var x;if(window.XMLHttpRequest){x=new XMLHttpRequest();}else{x=new ActiveXObject(\"Microsoft.XMLHTTP\");}x.open(\"GET\",\"/_ping\",false);x.send();},60000)</script>" -insideHead :: Pipe l (Flush S.ByteString) (Flush S.ByteString) r (ResourceT IO) r+insideHead :: Conduit (Flush S.ByteString) (ResourceT IO) (Flush S.ByteString) insideHead = loop' (S.empty, whole) where- loop' state = awaitE >>= either (close state) (push' state)+ loop' state = await >>= maybe (close state) (push' state) whole = "<head>" push' state (Chunk x) = push state x push' state Flush = yield Flush >> loop' state@@ -88,7 +88,7 @@ mapM_ (yield . Chunk) [held, x'] loop' (held', atFront') - close (held, _) r = mapM_ yield [Chunk held, Chunk toInsert] >> return r+ close (held, _) = mapM_ yield [Chunk held, Chunk toInsert] getOverlap :: S.ByteString -> S.ByteString -> (S.ByteString, S.ByteString, S.ByteString) getOverlap whole x =
wai-handler-launch.cabal view
@@ -1,5 +1,5 @@ Name: wai-handler-launch-Version: 1.3.1.2+Version: 1.3.1.3 Synopsis: Launch a web app in the default browser. Description: This handles cross-platform launching and inserts Javascript code to ping the server. When the server no longer receives pings, it shuts down. License: MIT@@ -19,9 +19,9 @@ , transformers >= 0.2.2 && < 0.4 , bytestring >= 0.9.1.4 , blaze-builder >= 0.2.1.4 && < 0.4- , conduit >= 0.5 && < 0.6- , blaze-builder-conduit >= 0.5 && < 0.6- , zlib-conduit >= 0.5 && < 0.6+ , conduit >= 0.5 && < 1.1+ , blaze-builder-conduit >= 0.5 && < 1.1+ , zlib-conduit >= 0.5 && < 1.1 if os(windows) c-sources: windows.c