Fix errors when trying to download raw diffs with unicode filenames.

Review Request #3558 — Created Nov. 25, 2012 and submitted

david
Review Board
release-1.7.x
2581
reviewboard
Fix errors when trying to download raw diffs with unicode filenames.

The filename field in the header would cause errors if the diff that was
uploaded had characters that weren't US-ASCII. This change adds an encoding step
that strips out any offending characters.

While I was in here, I changed the silly "bug%s" logic for filename fallbacks to
use rb-<id>.patch.
Created a diff named test\u1D121.diff and uploaded it. Downloaded the resulting raw
diff and saw it try to save with a filename of "test.diff"
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.7.x (d910f95).
Loading...