packages feed

hack-handler-hyena 2010.1.17 → 2010.1.18

raw patch · 5 files changed

+11/−14 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Nemesis view
@@ -27,7 +27,7 @@    desc "test"   task "test" $ do-    sh "ghc --make -threaded -isrc src/Test.hs -o Test"+    sh "ghc --make -threaded  -O2 -isrc src/Test.hs -o Test"     sh "echo ready..."     sh "./Test"   
hack-handler-hyena.cabal view
@@ -1,5 +1,5 @@ Name:                 hack-handler-hyena-Version:              2010.1.17+Version:              2010.1.18 Build-type:           Simple Synopsis:             Hyena hack handler Description:          Hyena hack handler@@ -10,7 +10,7 @@ Build-Depends:        base Cabal-version:        >= 1.2 category:             Web-homepage:             http://github.com/nfjinjing/hack/tree/master+homepage:             http://github.com/nfjinjing/hack-handler-hyena data-files:           readme.md, changelog.md, known-issues.md, Nemesis, src/Test.hs  library
known-issues.md view
@@ -1,2 +0,0 @@-* The hyena handler is not complete, i.e. the request body is not preserved. Patch needed to convert an enumerable to lazy bytestring :)-* there is a bug in the handler, which prevents hack from serving large binary files, e.g. `Hack.Contrib.Middleware.Static` won't work properly
readme.md view
@@ -1,18 +1,14 @@-### Note--The hyena handler is not complete, i.e. the request body is not preserved. Patch needed to convert an enumerable to lazy bytestring :)- ### Config -to use a different port, start with+to use a different port, start with (default port is 3000) -    ./main -p 3456+    ./main -p 3000  It's the same as the hyena config.  Also use runWithConfig to put your custom port into Env, otherwise, your app won't get this port information. -    runWithConfig (def {port = 3456}) your_app+    runWithConfig (def {port = 3000}) your_app  ### In practice 
src/Test.hs view
@@ -4,11 +4,14 @@ import Hack.Handler.Hyena import Hack.Contrib.Middleware.Inspect import Hack.Contrib.Middleware.Debug+import Hack.Contrib.Middleware.ContentLength import Hack.Contrib.Utils import Data.ByteString.Lazy.Char8 (pack) +pong = pack "pong\n"+ app :: Application app = \env -> return $-  Response 200 [ ("Content-Type", "text/plain") ] (pack "Hello World")+  Response 200 [ ("Content-Type", "text/plain") ] pong -main = run $ use [debug (\e r -> print e), inspect] app+main = run $ content_length app