if (!trans.cache || ! caching) {
if (!trans.cache) {
    private void writeResponse (HttpServletResponse res, ResponseTrans trans, Cookie[] cookies, String protocol) {				for (int i = 0; i < trans.countCookies(); i++) try {	    Cookie c = new Cookie(trans.getKeyAt(i), trans.getValueAt(i));		    c.setPath ("/");	    if (cookieDomain != null)	        c.setDomain (cookieDomain);				    int expires = trans.getDaysAt(i);	    if (expires > 0)	        c.setMaxAge(expires * 60*60*24);   // Cookie time to live, days -> seconds		    res.addCookie(c);					} catch (Exception ign) {}	if (trans.getRedirect () != null) {	    try { 	        res.sendRedirect(trans.getRedirect ());	    } catch(Exception io_e) {}	} else {                 if (!trans.cache || ! caching) {	        // Disable caching of response.	        if (protocol == null || !protocol.endsWith ("1.1"))	            res.setHeader ("Pragma", "no-cache"); // for HTTP 1.0	        else	            res.setHeader ("Cache-Control", "no-cache"); // for HTTP 1.1	    }	    if (trans.status > 0)	        res.setStatus (trans.status);	    res.setContentLength (trans.getContentLength ());				    res.setContentType (trans.contentType);	    try {	        OutputStream out = res.getOutputStream ();	        out.write (trans.getContent ());	        out.close ();	    } catch(Exception io_e) { System.out.println ("Error in writeResponse: "+io_e); }	}    }