/** * Send a header. * * @param name Header name * @param value Header value */ public void sendHeader(MessageBytes name, MessageBytes value) { if (name.getLength() > 0 && !value.isNull()) { write(name); buf[pos++] = Constants.COLON; buf[pos++] = Constants.SP; write(value); buf[pos++] = Constants.CR; buf[pos++] = Constants.LF; } }
/** * Send a header. * * @param name Header name * @param value Header value */ public void sendHeader(MessageBytes name, MessageBytes value) { if (name.getLength() > 0 && !value.isNull()) { write(name); buf[pos++] = Constants.COLON; buf[pos++] = Constants.SP; write(value); buf[pos++] = Constants.CR; buf[pos++] = Constants.LF; } }
/** * Send a header. * * @param name * Header name * @param value * Header value */ public void sendHeader(MessageBytes name, MessageBytes value) { if (name.getLength() > 0 && !value.isNull()) { write(name); buf[pos++] = Constants.COLON; buf[pos++] = Constants.SP; write(value); buf[pos++] = Constants.CR; buf[pos++] = Constants.LF; } }
public void processParameters( MessageBytes data, String encoding ) { if( data==null || data.isNull() || data.getLength() <= 0 ) { return; } if( data.getType() != MessageBytes.T_BYTES ) { data.toBytes(); } ByteChunk bc=data.getByteChunk(); processParameters( bc.getBytes(), bc.getOffset(), bc.getLength(), encoding); }
public void processParameters( MessageBytes data, String encoding ) { if( data==null || data.isNull() || data.getLength() <= 0 ) return; if( data.getType() != MessageBytes.T_BYTES ) { data.toBytes(); } ByteChunk bc=data.getByteChunk(); processParameters( bc.getBytes(), bc.getOffset(), bc.getLength(), encoding); }
public void processParameters(MessageBytes data, String encoding) { if (data == null || data.isNull() || data.getLength() <= 0) return; if (data.getType() != MessageBytes.T_BYTES) { data.toBytes(); } ByteChunk bc = data.getByteChunk(); processParameters(bc.getBytes(), bc.getOffset(), bc.getLength(), encoding); }
public void processParameters(MessageBytes data, Charset charset) { if( data==null || data.isNull() || data.getLength() <= 0 ) { return; } if( data.getType() != MessageBytes.T_BYTES ) { data.toBytes(); } ByteChunk bc=data.getByteChunk(); processParameters(bc.getBytes(), bc.getOffset(), bc.getLength(), charset); }
public void processParameters( MessageBytes data, String encoding ) { if( data==null || data.isNull() || data.getLength() <= 0 ) { return; } if( data.getType() != MessageBytes.T_BYTES ) { data.toBytes(); } ByteChunk bc=data.getByteChunk(); processParameters( bc.getBytes(), bc.getOffset(), bc.getLength(), getCharset(encoding)); }
public void processParameters( MessageBytes data, String encoding ) { if( data==null || data.isNull() || data.getLength() <= 0 ) { return; } if( data.getType() != MessageBytes.T_BYTES ) { data.toBytes(); } ByteChunk bc=data.getByteChunk(); processParameters( bc.getBytes(), bc.getOffset(), bc.getLength(), getCharset(encoding)); }
public void processParameters( MessageBytes data, String encoding ) { if( data==null || data.isNull() || data.getLength() <= 0 ) { return; } if( data.getType() != MessageBytes.T_BYTES ) { data.toBytes(); } ByteChunk bc=data.getByteChunk(); processParameters( bc.getBytes(), bc.getOffset(), bc.getLength(), getCharset(encoding)); }
public void processParameters( MessageBytes data, String encoding ) { if( data==null || data.isNull() || data.getLength() <= 0 ) return; if( data.getType() == MessageBytes.T_BYTES ) { ByteChunk bc=data.getByteChunk(); processParameters( bc.getBytes(), bc.getOffset(), bc.getLength(), encoding); } else { if (data.getType()!= MessageBytes.T_CHARS ) data.toChars(); CharChunk cc=data.getCharChunk(); processParameters( cc.getChars(), cc.getOffset(), cc.getLength()); } }
MessageBytes hN = headers.getName(i); MessageBytes hV=headers.getValue(i); if (hN.getLength() > 0 && !hV.isNull()) { int hC = Constants.getResponseAjpIndex(hN.toString()); if (hC > 0) {
MessageBytes hN = headers.getName(i); MessageBytes hV=headers.getValue(i); if (hN.getLength() > 0 && !hV.isNull()) { int hC = Constants.getResponseAjpIndex(hN.toString()); if (hC > 0) {
public int invoke( Msg in, MsgContext ep ) throws IOException { MsgAjp msg=(MsgAjp)ep.getNote( headersMsgNote ); if( msg==null ) { msg=new MsgAjp(); ep.setNote( headersMsgNote, msg ); } msg.reset(); msg.appendByte(AjpConstants.JK_AJP13_SEND_HEADERS); msg.appendInt(200); msg.appendBytes(null); msg.appendInt(0); ep.setType( JkHandler.HANDLE_SEND_PACKET ); ep.getSource().invoke( msg, ep ); // msg.dump("out:" ); msg.reset(); msg.appendByte( AjpConstants.JK_AJP13_SEND_BODY_CHUNK); msg.appendInt( body.getLength() ); msg.appendBytes( body ); ep.getSource().invoke(msg, ep); msg.reset(); msg.appendByte( AjpConstants.JK_AJP13_END_RESPONSE ); msg.appendInt( 1 ); ep.getSource().invoke(msg, ep ); return OK; }