Changeset 33ea4cf


Ignore:
Timestamp:
Feb 20, 2018 7:45:49 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f00bf7d
Parents:
86b3b13
Message:

Console: Change sendError() to setStatus() for 3xx responses
to avoid unnecessary output

Location:
apps
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    r86b3b13 r33ea4cf  
    13691369            buf.append(p.replace("&amp;", "&"));  // no you don't html escape the redirect header
    13701370        resp.setHeader("Location", buf.toString());
    1371         resp.sendError(303, "Received");
     1371        resp.setStatus(303);
     1372        resp.flushBuffer();
    13721373    }
    13731374
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/CodedIconRendererServlet.java

    r86b3b13 r33ea4cf  
    6464                 }
    6565             } else {
    66                  srs.sendError(304, "Not Modified");
     66                 srs.setStatus(304);
     67                 srs.flushBuffer();
    6768             }
    6869         } else {
  • apps/routerconsole/jsp/flags.jsp

    r86b3b13 r33ea4cf  
    3232        // iflast is -1 if not present; round down file time
    3333        if (iflast >= ((lastmod / 1000) * 1000)) {
    34             response.sendError(304, "Not Modified");
     34            response.setStatus(304);
    3535            return;
    3636        }
  • apps/routerconsole/jsp/viewtheme.jsp

    r86b3b13 r33ea4cf  
    5353    // iflast is -1 if not present; round down file time
    5454    if (iflast >= ((lastmod / 1000) * 1000)) {
    55         response.sendError(304, "Not Modified");
     55        response.setStatus(304);
    5656        return;
    5757    }
  • apps/susimail/src/src/i2p/susi/webmail/WebMail.java

    r86b3b13 r33ea4cf  
    22882288                        buf.append(q.replace("&amp;", "&"));  // no you don't html escape the redirect header
    22892289                resp.setHeader("Location", buf.toString());
    2290                 resp.sendError(303, "Received");
     2290                resp.setStatus(303);
     2291                resp.flushBuffer();
    22912292                Debug.debug(Debug.DEBUG, "P-R-G to " + q);
    22922293        }
Note: See TracChangeset for help on using the changeset viewer.