From b87f64c979c79592e6824ee531478eacdaa384bb Mon Sep 17 00:00:00 2001 From: PHO Date: Mon, 14 Nov 2011 11:26:53 +0900 Subject: [PATCH] The MIMEParams parser should consider an omitted charset to be an error. --- Network/HTTP/Lucu/MIMEParams.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Network/HTTP/Lucu/MIMEParams.hs b/Network/HTTP/Lucu/MIMEParams.hs index 9c39236..9e5b938 100644 --- a/Network/HTTP/Lucu/MIMEParams.hs +++ b/Network/HTTP/Lucu/MIMEParams.hs @@ -184,8 +184,7 @@ initialEncodedValue -- NOTE: I'm not sure this is the right thing, but RFC -- 2231 doesn't tell us what we should do when the -- charset is omitted. - return ("US-ASCII", payload) - -- FIXME: Rethink about this behaviour. + fail "charset is missing" else return (charset, payload) where -- 2.40.0