JsonConversionException, IOException, UnauthorisedException {
String json = getJsonAsString(req, maxJsonQueryLength);
if (DEBUG_JSON) {
System.out.println(json);
}
PutRequest request = MessageLibrary.putRequestFromJson(json);
if (!protocol.put(request)) {
throw new ServletException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Internal storage error for key "
+ Base64.encodeBase64String(request.getKey().toByteArray()));
}
emptyBody(resp);
}