/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public Buffer get(Buffer name) { Field field = getField(name); return field==null?null:field._value; }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public Buffer get(Buffer name) { Field field = getField(name); return field==null?null:field._value; }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public Buffer get(Buffer name) { Field field = getField(name); return field==null?null:field._value; }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @exception NumberFormatException If bad long found */ public long getLongField(String name) throws NumberFormatException { Field field = getField(name); return field==null?-1L:field.getLongValue(); }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @exception NumberFormatException If bad long found */ public long getLongField(Buffer name) throws NumberFormatException { Field field = getField(name); return field==null?-1L:field.getLongValue(); }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @exception NumberFormatException If bad long found */ public long getLongField(Buffer name) throws NumberFormatException { Field field = getField(name); return field==null?-1L:field.getLongValue(); }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @return the value of the field as a long * @exception NumberFormatException If bad long found */ public long getLongField(String name) throws NumberFormatException { HttpField field = getField(name); return field==null?-1L:field.getLongValue(); }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public String getStringField(Buffer name) { Field field = getField(name); return field==null?null:field.getValue(); }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @exception NumberFormatException If bad long found */ public long getLongField(Buffer name) throws NumberFormatException { Field field = getField(name); return field==null?-1L:field.getLongValue(); }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public String getStringField(String name) { Field field = getField(name); return field==null?null:field.getValue(); }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public String getStringField(String name) { HttpField field = getField(name); return field==null?null:field.getValue(); }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @exception NumberFormatException If bad long found */ public long getLongField(String name) throws NumberFormatException { HttpField field = getField(name); return field==null?-1L:field.getLongValue(); }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @exception NumberFormatException If bad long found */ public long getLongField(String name) throws NumberFormatException { Field field = getField(name); return field==null?-1L:field.getLongValue(); }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public String getStringField(Buffer name) { Field field = getField(name); return field==null?null:field.getValue(); }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public String getStringField(String name) { Field field = getField(name); return field==null?null:field.getValue(); }
/** * @return the value of a field, or null if not found. For multiple fields of the same name, * only the first is returned. * @param name the case-insensitive field name */ public String getStringField(Buffer name) { Field field = getField(name); return field==null?null:field.getValue(); }
private void logHeaders(String string, HttpFields headers) { this.logger.debug(string + " Headers"); String direction = string.equals("Request") ? ">> " : "<< "; for (int i = 0; i < headers.size(); ++i) { Field field = headers.getField(i); this.logger.debug(direction + field.getName() + ": " + field.getValue()); } }
/** * Get a header as an long value. Returns the value of an integer field or -1 if not found. The * case of the field name is ignored. * * @param name the case-insensitive field name * @exception NumberFormatException If bad long found */ public long getLongField(String name) throws NumberFormatException { HttpField field = getField(name); return field==null?-1L:StringUtil.toLong(field.getValue()); }
private void copyIfAbsent(HttpRequest oldRequest, Request newRequest, HttpHeader header) { HttpField field = oldRequest.getHeaders().getField(header); if (field != null && !newRequest.getHeaders().contains(header)) newRequest.getHeaders().put(field); }
@Override public Deflater getDeflater(org.eclipse.jetty.server.Request request, long content_length) { // GzipHandler incorrectly skips this check for HTTP/2 HttpField accept = request.getHttpFields().getField(HttpHeader.ACCEPT_ENCODING); if ((accept == null) || !accept.contains("gzip")) { return null; } return super.getDeflater(request, content_length); } }