/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(String name, String value) { if (isCommitted()) return; // Ignore any call from an included servlet if (included) return; response.addHeader(name, value); }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(String name, String value) { checkResponse(); if (isCommitted()) return; // Ignore any call from an included servlet if (included) return; response.addHeader(name, value); }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(String name, String value) { checkResponse(); if (isCommitted()) return; // Ignore any call from an included servlet if (included) return; response.addHeader(name, value); }
private static void handleUnsupportedVersion(final Response response) throws IOException { response.setStatus(400); response.setMessage("Bad Request"); response.addHeader(WebSocketEngine.SEC_WS_VERSION, Version.getSupportedWireProtocolVersions()); response.sendHeaders(); response.flush(); }