nacho
unread,Dec 28, 2010, 10:44:43 PM12/28/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
I have a servlet that sends a file to the browser, i get the data from
the datastore.
I send this headers in the servlet.
if (request.isSecure()) {
response.addHeader("Pragma", "no-cache");
response.addHeader("Expires", "-1");
response.addHeader("Cache-Control", "no-cache");
} else {
response.addHeader("Cache-Control", "private");
response.addHeader("Pragma", "public");
}
if (isIE) {
response.addHeader("Content-Disposition", "attachment;
filename=\"" + encName + "\"" );
response.addHeader("Connection", "close");
response.setContentType("application/force-download; name=
\"" + encName + "\"" );
} else {
response.addHeader("Content-Disposition", "attachment;
filename=\"" + encName + "\"" );
response.setContentType("application/octet-stream; name=\"" +
encName + "\"" );
if (contentLen > 0) {
response.setContentLength(contentLen);
}
}
Then i send the file to the browser, but i'm having troubles with the
file encoding.
For example, in the downloaded file i get a line like this
howDoesItWorksStep21Description=El usuario elige la operadora de su
tel??fono m??vil.
But the data is stored right in the datastore ("El usuario elige la
operadora de su teléfono móvil.")
Does anyone have idea how can i do to fix it? Am I missing any header?