Commits

Olemis Lang committed 41ab8e7 Merge

TracGViz: Incorprate enhancements to send_request from providers branch into default branch

  • Participants
  • Parent commits fc0334a, d46c206

Comments (0)

Files changed (3)

File trac-dev/gviz/TODO

 ~ Write tests for data sources included in TracGViz 1.3.4 that are 
   not about version control.
 
+- Use FSL to select files in GViz providers ?
+
 - Fix error using Python 2.6 `hmac` hashing in Ubuntu 10.04.
 
 {{{
   conditions are met e.g. ticket custom fields in 
   `ticket.GVizTicketReport`).
 - Execute reports defined using URLs pointing to saved custom queries.
+
 - Introduce support for GViz warnings (specially `data_truncated` 
   warnings).
+
 - Implement architecture in order to export data.
 - Export data to Google Spreadsheets.
 

File trac-dev/gviz/setup.py

       'Trac>=0.11',
       'TracXMLRPC',
       'Pygments>=1.0',
+      'dutest>=0.2.4',
   ],
   package_dir = dict([p, i[0]] for p, i in PKG_INFO.iteritems()),
   packages = PKG_INFO.keys(),

File trac-dev/gviz/tracgviz/util/__init__.py

     r"""Send an HTTP response back to the caller.
     """
     req.send_response(status)
-    req.send_header('Content-Type', mimetype)
-    if req._outcharset == 'utf-8':
-      req.send_header('Content-Length', len(response))
+    req.send_header('Content-Type', mimetype + ';charset=utf-8')
+    if isinstance(response, unicode):
+      response = response.encode('utf-8')
+    req.send_header('Content-Length', len(response))
     for k, v in dict(extra_headers).iteritems():
         req.send_header(k, v)
     req.end_headers()