In cases where _encoding == ENCODING_URL and the HTMLForm::prepareSubmit(HTTPRequest& request) has been called, a call to HTMLForm::calculateContentLength() still throws a HTMLFormException("Form must be prepared") exception.
The solution appears to have HTMLForm::calculateContentLength() return 0 if _encoding == ENCODING_URL.