static void putString(final ByteBuffer buf, String value) { final int length = value.length(); putInt(buf, length); for (int i = 0; i < length; ++i) { buf.put((byte) value.charAt(i)); } buf.put((byte) 0); }
static void putHttpString(final ByteBuffer buf, HttpString value) { final int length = value.length(); putInt(buf, length); value.appendTo(buf); buf.put((byte) 0); }
putString(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.REMOTE_HOST))); putString(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.SERVER_NAME))); AjpUtils.putInt(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.SERVER_PORT))); buffer.put((byte) (notNull(attachable.getAttachment(ProxiedRequestAttachments.IS_SSL)) ? 1 : 0)); AjpUtils.putInt(buffer, headers); Integer headerCode = AjpConstants.HEADER_MAP.get(header); if (headerCode != null) { AjpUtils.putInt(buffer, headerCode); } else { AjpUtils.putHttpString(buffer, header);
static void putString(final ByteBuffer buf, String value) { final int length = value.length(); putInt(buf, length); for (int i = 0; i < length; ++i) { buf.put((byte) value.charAt(i)); } buf.put((byte) 0); }
static void putString(final ByteBuffer buf, String value) { final int length = value.length(); putInt(buf, length); for (int i = 0; i < length; ++i) { buf.put((byte) value.charAt(i)); } buf.put((byte) 0); }
static void putHttpString(final ByteBuffer buf, HttpString value) { final int length = value.length(); putInt(buf, length); value.appendTo(buf); buf.put((byte) 0); }
static void putHttpString(final ByteBuffer buf, HttpString value) { final int length = value.length(); putInt(buf, length); value.appendTo(buf); buf.put((byte) 0); }
putString(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.REMOTE_HOST))); putString(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.SERVER_NAME))); AjpUtils.putInt(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.SERVER_PORT))); buffer.put((byte) (notNull(attachable.getAttachment(ProxiedRequestAttachments.IS_SSL)) ? 1 : 0)); AjpUtils.putInt(buffer, headers); Integer headerCode = AjpConstants.HEADER_MAP.get(header); if (headerCode != null) { AjpUtils.putInt(buffer, headerCode); } else { AjpUtils.putHttpString(buffer, header);
putString(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.REMOTE_HOST))); putString(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.SERVER_NAME))); AjpUtils.putInt(buffer, notNull(attachable.getAttachment(ProxiedRequestAttachments.SERVER_PORT))); buffer.put((byte) (notNull(attachable.getAttachment(ProxiedRequestAttachments.IS_SSL)) ? 1 : 0)); AjpUtils.putInt(buffer, headers); Integer headerCode = AjpConstants.HEADER_MAP.get(header); if (headerCode != null) { AjpUtils.putInt(buffer, headerCode); } else { AjpUtils.putHttpString(buffer, header);