/* Setting to nonzero forces a MIME type of application/octet-stream */
int force_download = 1;
- serv_printf("OPEN %s", filename);
+ safestrncpy(buf, filename, sizeof buf);
+ unescape_input(buf);
+ serv_printf("OPEN %s", buf);
serv_getln(buf, sizeof buf);
if (buf[0] == '2') {
bytes = extract_long(&buf[4], 0);
/**
* \brief Escape a string for feeding out as a URL.
- * Returns a pointer to a buffer that must be freed by the caller!
* \param outbuf the output buffer
* \param strbuf the input buffer
*/