HUE-8253 [editor] Support downloading Query results with query names(file names) other than ISO-8859-1 charset

Review Request #12901 - Created April 26, 2018 and submitted

Roohi Syeda
hue
HUE-8253_query_dwld_non_ascii
HUE-8253
hue
enricoberti, jgauthier, johan, ranade, romain, weixia, yingc
commit 966858e135f1844e1593089a0a42983e97854009
Author: Roohi <roohisyeda@cloudera.com>
Date:   Thu Apr 26 12:19:19 2018 -0700

    HUE-8253 [editor] Support downloading Query results with query names(file names) other than ISO-8859-1 charset

:100644 100644 386d96ee30... b8ee33bda7... M	desktop/core/src/desktop/lib/export_csvxls.py

Chrome, FireFox and IE

  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
  1. Nice!

    And easy to add a quick test? https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/lib/test_export_csvxls.py#L29

  2. Remove the duplication?

    try:
    name = ..
    except..
    name = ...

    resp['Content-Disposition'] = 'attachment; filename="%s.%s"' % (name, format)

    1. So this parameter is not filename it is filename* for non-ASCII characters as per RFC, https://tools.ietf.org/html/rfc6266#appendix-D. Only FF is follwing the RFC. I had to make changes in other files to support it based on user agent

  3. 
      
  1. Nice one and well tested!

  2. user_agent = request.META.get('HTTP_USER_AGENT')

    should be the same?

  3. 
      
Review request changed

Status: Closed (submitted)

Loading...