]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/RequestReader.hs
staticDir
[Lucu.git] / Network / HTTP / Lucu / RequestReader.hs
index 00d3b03ea5251a3b1fe12ae5c2dccb5a7caa339b..9b54ca58e92ac648a20bc6dbcd07b4b0dbd7f949 100644 (file)
@@ -85,8 +85,8 @@ requestReader cnf tree h host tQueue
                                Nothing -- Resource が無かった
                                    -> acceptRequestForNonexistentResource itr input
 
-                               Just rsrcDef -- あった
-                                   -> acceptRequestForExistentResource itr input rsrcDef
+                               Just (rsrcPath, rsrcDef) -- あった
+                                   -> acceptRequestForExistentResource itr input rsrcPath rsrcDef
                action
 
       acceptSemanticallyInvalidRequest :: Interaction -> ByteString -> STM (IO ())
@@ -111,9 +111,10 @@ requestReader cnf tree h host tQueue
                enqueue itr
                return $ acceptRequest input
 
-      acceptRequestForExistentResource :: Interaction -> ByteString -> ResourceDef -> STM (IO ())
-      acceptRequestForExistentResource itr input rsrcDef
-          = do requestHasBody <- readItr itr itrRequestHasBody id
+      acceptRequestForExistentResource :: Interaction -> ByteString -> [String] -> ResourceDef -> STM (IO ())
+      acceptRequestForExistentResource oldItr input rsrcPath rsrcDef
+          = do let itr = oldItr { itrResourcePath = Just rsrcPath }
+               requestHasBody <- readItr itr itrRequestHasBody id
                enqueue itr
                return $ do runResource rsrcDef itr
                            if requestHasBody then