@mmn @andstatus ...and even the # "solution" looks like a dirty hack. "on error, go to a page that doesn't treat it as an error!".
HTTP/1.1 describes "411 Length Required" as "The request did not specify the length of its content, which is required by the requested resource". If the resource requires it - the solution is not to add a hack on the resource side but instead to supply the missing information. I.e. the "Content-Length" header. Which should be no problem for a predictable data source such as a notice + file(s) as attachment.