/** * {@inheritDoc} * The default behavior of this method is to return getResponseHeaderValue() on the wrapped connection object. */ public String getResponseHeaderValue(final String headerName) { return wrappedWebResponse_.getResponseHeaderValue(headerName); }
/** * {@inheritDoc} * The default behavior of this method is to return getResponseHeaderValue() on the wrapped webResponse object. */ @Override public String getResponseHeaderValue(final String headerName) { return wrappedWebResponse_.getResponseHeaderValue(headerName); }
/** * {@inheritDoc} * The default behavior of this method is to return getResponseHeaderValue() on the wrapped connection object. */ public String getResponseHeaderValue(final String headerName) { return wrappedWebResponse_.getResponseHeaderValue(headerName); }
/** * {@inheritDoc} * The default behavior of this method is to return getResponseHeaderValue() on the wrapped webResponse object. */ @Override public String getResponseHeaderValue(final String headerName) { return wrappedWebResponse_.getResponseHeaderValue(headerName); }
/** * {@inheritDoc} * The default behavior of this method is to return getResponseHeaderValue() on the wrapped connection object. */ public String getResponseHeaderValue(final String headerName) { return wrappedWebResponse_.getResponseHeaderValue(headerName); }
private static boolean containsValue(final WebResponse response, final String value) { final String cacheControl = response.getResponseHeaderValue(HttpHeader.CACHE_CONTROL); return StringUtils.contains(cacheControl, value); } }
/** * Retrieves the value of an HTTP header from the response body. * @param headerName the (case-insensitive) name of the header to retrieve * @return the value of the specified HTTP header */ public String jsxFunction_getResponseHeader(final String headerName) { if (webResponse_ != null) { return webResponse_.getResponseHeaderValue(headerName); } LOG.error("XMLHttpRequest.getResponseHeader() was called before the response was available."); return null; }
/** * Returns {@code true} if the specified response represents an attachment. * @param response the response to check * @return {@code true} if the specified response represents an attachment, {@code false} otherwise * @see <a href="http://www.ietf.org/rfc/rfc2183.txt">RFC 2183</a> */ public static boolean isAttachment(final WebResponse response) { final String disp = response.getResponseHeaderValue("Content-Disposition"); if (disp == null) { return false; } return disp.startsWith("attachment"); }
/** * Returns <tt>true</tt> if the specified response represents an attachment. * @param response the response to check * @return <tt>true</tt> if the specified response represents an attachment, <tt>false</tt> otherwise * @see <a href="http://www.ietf.org/rfc/rfc2183.txt">RFC 2183</a> */ public static boolean isAttachment(final WebResponse response) { final String disp = response.getResponseHeaderValue("Content-Disposition"); if (disp == null) { return false; } return disp.startsWith("attachment"); }
/** * Retrieves the value of an HTTP header from the response body. * @param headerName the (case-insensitive) name of the header to retrieve * @return the value of the specified HTTP header */ public String jsxFunction_getResponseHeader(final String headerName) { if (webResponse_ != null) { return webResponse_.getResponseHeaderValue(headerName); } LOG.error("XMLHttpRequest.getResponseHeader() was called before the response was available."); return null; }
/** * Retrieves the value of an HTTP header from the response body. * @param headerName the (case-insensitive) name of the header to retrieve * @return the value of the specified HTTP header */ public String jsxFunction_getResponseHeader(final String headerName) { if (webResponse_ != null) { return webResponse_.getResponseHeaderValue(headerName); } LOG.error("XMLHttpRequest.getResponseHeader() was called before the response was available."); return null; }
/** * Returns <tt>true</tt> if the specified response represents an attachment. * @param response the response to check * @return <tt>true</tt> if the specified response represents an attachment, <tt>false</tt> otherwise * @see <a href="http://www.ietf.org/rfc/rfc2183.txt">RFC 2183</a> */ public static boolean isAttachment(final WebResponse response) { final String disp = response.getResponseHeaderValue("Content-Disposition"); if (disp == null) { return false; } return disp.startsWith("attachment"); }
private static boolean containsValue(final WebResponse response, final String value) { final String cacheControl = response.getResponseHeaderValue(HttpHeader.CACHE_CONTROL); return StringUtils.contains(cacheControl, value); } }
private static long directiveValue(final WebResponse response, final Pattern pattern) { final String value = response.getResponseHeaderValue(HttpHeader.CACHE_CONTROL); if (value != null) { final Matcher matcher = pattern.matcher(value); if (matcher.matches()) { return Long.valueOf(matcher.group(1)); } } return 0; }
private static long directiveValue(final WebResponse response, final Pattern pattern) { final String value = response.getResponseHeaderValue(HttpHeader.CACHE_CONTROL); if (value != null) { final Matcher matcher = pattern.matcher(value); if (matcher.matches()) { return Long.parseLong(matcher.group(1)); } } return 0; }
protected String getCid(Page page) { return page.getWebResponse().getResponseHeaderValue(AbstractConversationTest.CID_HEADER_NAME); }
protected Boolean hasRained(Page page) { return Boolean.valueOf(page.getWebResponse().getResponseHeaderValue(Cloud.RAINED_HEADER_NAME)); }
@Override public String getHeader(String name) { return getWebResponse().getResponseHeaderValue(name); }
/** * Returns an auto-refresh string if specified. This will look in both the meta * tags and inside the HTTP response headers. * @return the auto-refresh string */ private String getRefreshStringOrNull() { final List<HtmlMeta> metaTags = getMetaTags("refresh"); if (!metaTags.isEmpty()) { return metaTags.get(0).getContentAttribute().trim(); } return getWebResponse().getResponseHeaderValue("Refresh"); }
/** * Returns an auto-refresh string if specified. This will look in both the meta * tags and inside the HTTP response headers. * @return the auto-refresh string */ private String getRefreshStringOrNull() { final List<HtmlMeta> metaTags = getMetaTags("refresh"); if (!metaTags.isEmpty()) { return metaTags.get(0).getContentAttribute().trim(); } return getWebResponse().getResponseHeaderValue("Refresh"); }