Fix #26: downloadHandler doesn't work well with text/html content type