Redirect location field isn't in ResponseTrans isn't public anymore.
User status field from ResponseTrans, if set.
This commit is contained in:
parent
a6b45deaa8
commit
9e43be37f7
2 changed files with 10 additions and 5 deletions
|
@ -195,12 +195,13 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
res.addCookie(c);
|
res.addCookie(c);
|
||||||
} catch (Exception ign) {}
|
} catch (Exception ign) {}
|
||||||
|
|
||||||
if (trans.redirect != null) {
|
if (trans.getRedirect () != null) {
|
||||||
try {
|
try {
|
||||||
res.sendRedirect(trans.redirect);
|
res.sendRedirect(trans.getRedirect ());
|
||||||
} catch(Exception io_e) {}
|
} catch(Exception io_e) {}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!trans.cache || ! caching) {
|
if (!trans.cache || ! caching) {
|
||||||
// Disable caching of response.
|
// Disable caching of response.
|
||||||
if (protocol == null || !protocol.endsWith ("1.1"))
|
if (protocol == null || !protocol.endsWith ("1.1"))
|
||||||
|
@ -208,6 +209,8 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
else
|
else
|
||||||
res.setHeader ("Cache-Control", "no-cache"); // for HTTP 1.1
|
res.setHeader ("Cache-Control", "no-cache"); // for HTTP 1.1
|
||||||
}
|
}
|
||||||
|
if (trans.status > 0)
|
||||||
|
res.setStatus (trans.status);
|
||||||
res.setContentLength (trans.getContentLength ());
|
res.setContentLength (trans.getContentLength ());
|
||||||
res.setContentType (trans.contentType);
|
res.setContentType (trans.contentType);
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -154,12 +154,13 @@ public class AcmeServletClient extends HttpServlet {
|
||||||
res.addCookie(c);
|
res.addCookie(c);
|
||||||
} catch (Exception ign) {}
|
} catch (Exception ign) {}
|
||||||
|
|
||||||
if (trans.redirect != null) {
|
if (trans.getRedirect () != null) {
|
||||||
try {
|
try {
|
||||||
res.sendRedirect(trans.redirect);
|
res.sendRedirect(trans.getRedirect ());
|
||||||
} catch(Exception io_e) {}
|
} catch(Exception io_e) {}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!trans.cache || ! caching) {
|
if (!trans.cache || ! caching) {
|
||||||
// Disable caching of response.
|
// Disable caching of response.
|
||||||
if (protocol == null || !protocol.endsWith ("1.1"))
|
if (protocol == null || !protocol.endsWith ("1.1"))
|
||||||
|
@ -167,7 +168,8 @@ public class AcmeServletClient extends HttpServlet {
|
||||||
else
|
else
|
||||||
res.setHeader ("Cache-Control", "no-cache"); // for HTTP 1.1
|
res.setHeader ("Cache-Control", "no-cache"); // for HTTP 1.1
|
||||||
}
|
}
|
||||||
res.setStatus( HttpServletResponse.SC_OK );
|
if (trans.status > 0)
|
||||||
|
res.setStatus (trans.status);
|
||||||
res.setContentLength (trans.getContentLength ());
|
res.setContentLength (trans.getContentLength ());
|
||||||
res.setContentType (trans.contentType);
|
res.setContentType (trans.contentType);
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue