import Network.HTTP.Lucu.Postprocess
import Network.HTTP.Lucu.Request
import Network.HTTP.Lucu.Response
+import Network.HTTP.Lucu.Response.StatusCode
import Network.HTTP.Lucu.Utils
import Network.Socket
#if defined(HAVE_SSL)
$ map cs allowedMethods
allowedMethods ∷ [Ascii]
- allowedMethods = nub $ concat [ methods resGet ["GET"]
- , methods resHead ["GET", "HEAD"]
+ allowedMethods = nub $ concat [ methods resGet ["GET", "HEAD"]
+ , methods resHead ["HEAD"]
, methods resPost ["POST"]
, methods resPut ["PUT"]
, methods resDelete ["DELETE"]
| n < 0 = fail ("getChunk: n must not be negative: " ⧺ show n)
| n ≡ 0 = return (∅)
| otherwise = do req ← getRequest
- if reqMustHaveBody req then
+ if reqHasBody req then
askForInput =≪ getInteraction
else
driftTo DecidingHeader *> return (∅)