diff --git a/Hack/Middleware/Jsonp.hs b/Hack/Middleware/Jsonp.hs
--- a/Hack/Middleware/Jsonp.hs
+++ b/Hack/Middleware/Jsonp.hs
@@ -29,7 +29,7 @@
 -- callback function.
 jsonp :: Middleware
 jsonp app env = do
-    let accept = fromMaybe "" $ lookup "HTTP_ACCEPT" $ http env
+    let accept = fromMaybe "" $ lookup "Accept" $ http env
     let gets = decodeUrlPairs $ queryString env
     let callback :: Maybe String
         callback =
@@ -40,24 +40,29 @@
             case callback of
                 Nothing -> env
                 Just _ -> env
-                        { http = changeVal "HTTP_ACCEPT"
+                        { http = changeVal "Accept"
                                            "application/json"
                                            $ http env
                         }
     res <- app env'
+    let ctype = fromMaybe "" $ lookup "Content-Type" $ headers res
+    putStrLn $ "callback: " ++ show callback ++ ", ctype: " ++ show ctype ++ ", accept: " ++ accept
     case callback of
-            Nothing -> return res
-            Just c -> return $ res
-                    { headers = changeVal "Content-type"
-                                          "text/javascript"
-                                          $ headers res
-                    , body = BS.concat
-                                [ toLazyByteString c
-                                , toLazyByteString "("
-                                , body res
-                                , toLazyByteString ")"
-                                ]
-                    }
+        Nothing -> return res
+        Just c ->
+          case ctype of
+            "application/json" -> return $ res
+                { headers = changeVal "Content-Type"
+                                      "text/javascript"
+                                      $ headers res
+                , body = BS.concat
+                            [ toLazyByteString c
+                            , toLazyByteString "("
+                            , body res
+                            , toLazyByteString ")"
+                            ]
+                }
+            _ -> return res
 
 changeVal :: String -> String -> [(String, String)] -> [(String, String)]
 changeVal key val old = (key, val) : filter (\(k, _) -> k /= key) old
diff --git a/hack-middleware-jsonp.cabal b/hack-middleware-jsonp.cabal
--- a/hack-middleware-jsonp.cabal
+++ b/hack-middleware-jsonp.cabal
@@ -1,5 +1,5 @@
 name:            hack-middleware-jsonp
-version:         0.0.0
+version:         0.0.1
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
