Ticket #1764: ticket1764.patch

File ticket1764.patch, 1.5 KB (added by ChosenOne, at 2012-06-10T18:52:26Z)

Content-Disposition: form-data; name="replace"

on

  • src/allmydata/web/common.py

    diff --git a/src/allmydata/web/common.py b/src/allmydata/web/common.py
    index 13385c5..1599b1e 100644
    a b def humanize_failure(f): 
    220220             "corruption. You should perform a filecheck on "
    221221             "this object to learn more.\n\nThe full error message is:\n"
    222222             "%s") % str(f.value)
    223         return (t, http.GONE)
     223        return (t, http.NOT_FOUND)
    224224    if f.check(NoSharesError):
    225225        t = ("NoSharesError: no shares could be found. "
    226226             "Zero shares usually indicates a corrupt URI, or that "
    def humanize_failure(f): 
    228228             "severe corruption. You should perform a filecheck on "
    229229             "this object to learn more.\n\nThe full error message is:\n"
    230230             "%s") % str(f.value)
    231         return (t, http.GONE)
     231        return (t, http.NOT_FOUND)
    232232    if f.check(UnrecoverableFileError):
    233233        t = ("UnrecoverableFileError: the directory (or mutable file) could "
    234234             "not be retrieved, because there were insufficient good shares. "
    def humanize_failure(f): 
    237237             "that shares have been lost due to server departure, hard drive "
    238238             "failure, or disk corruption. You should perform a filecheck on "
    239239             "this object to learn more.")
    240         return (t, http.GONE)
     240        return (t, http.NOT_FOUND)
    241241    if f.check(MustNotBeUnknownRWError):
    242242        quoted_name = quote_output(f.value.args[1], encoding="utf-8")
    243243        immutable = f.value.args[2]