X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FPostprocess.hs;h=29c3c5167cb375accbce646038b110a4a0b0b601;hp=6735652d6a5656410c6cc5ebfcdc922c11184761;hb=51eda5b;hpb=19043d7882f936be9b073cae34b52905016c3ad7 diff --git a/Network/HTTP/Lucu/Postprocess.hs b/Network/HTTP/Lucu/Postprocess.hs index 6735652..29c3c51 100644 --- a/Network/HTTP/Lucu/Postprocess.hs +++ b/Network/HTTP/Lucu/Postprocess.hs @@ -47,14 +47,14 @@ abortOnCertainConditions (NI {..}) $ A.toAsciiBuilder "Inappropriate status code for a response: " ⊕ printStatusCode resStatus - when ( resStatus ≡ MethodNotAllowed ∧ - hasHeader "Allow" res ) + when ( toStatusCode resStatus ≡ Just MethodNotAllowed ∧ + hasHeader "Allow" res ) $ abort' $ A.toAsciiBuilder "The status was " ⊕ printStatusCode resStatus ⊕ A.toAsciiBuilder " but no \"Allow\" header." - when ( resStatus ≢ NotModified ∧ + when ( toStatusCode resStatus ≢ Just NotModified ∧ isRedirection resStatus ∧ hasHeader "Location" res ) $ abort'