} else {
httpReq.returnBadRequest();
return;
}
HTTPResponse httpRes = new HTTPResponse();
httpRes.setStatusCode(HTTPStatus.OK);
if (contentType != null) {
httpRes.setContentType(contentType);
}
if (contentLanguage != null) {
// FIXME Check ACCEPT-LANGUAGE header in client request, and set a
// suitable code.
httpRes.setContentLanguage(contentLanguage);
}
httpRes.setContent(fileByte);
httpReq.post(httpRes);
}