Package org.apache.tomcat.lite.http.HttpMessage

Examples of org.apache.tomcat.lite.http.HttpMessage.HttpMessageBytes


    void parseMessage(HttpChannel http, BBuffer headB) throws IOException {
        //Parse the response
        line.recycle();
        headB.readLine(line);

        HttpMessageBytes msgBytes;

        if (serverMode) {
            msgBytes = http.httpReq.getMsgBytes();
            parseRequestLine(line, msgBytes.method(),
                    msgBytes.url(),
                    msgBytes.query(),
                    msgBytes.protocol());
        } else {
            msgBytes = http.httpRes.getMsgBytes();
            parseResponseLine(line, msgBytes.protocol(),
                    msgBytes.status(), msgBytes.message());
        }

        parseHeaders(http, msgBytes, headB);

        http.inMessage.state = HttpMessage.State.BODY_DATA;
View Full Code Here


                try {
                    // pri and unused
                    SpdyConnection.readShort(iob);

                    HttpMessageBytes reqBytes = ch.getRequest().getMsgBytes();

                    processHeaders(iob, ch, reqBytes);
                } catch (Throwable t) {
                    log.log(Level.SEVERE, "Error parsing head", t);
                    abort("Error reading headers " + t);
                    return;
                }
                ch.getRequest().processReceivedHeaders();

                ch.handleHeadersReceived(ch.getRequest());

                if ((currentInFrame.flags & SpdyConnection.Frame.FLAG_HALF_CLOSE) != 0) {
                    ch.getIn().close();
                    ch.handleEndReceive();
                }
            } else if (currentInFrame.type == SpdyConnection.Frame.TYPE_SYN_REPLY) {
                int chId = SpdyConnection.readInt(iob);
                HttpChannel ch;
                synchronized (channels) {
                    ch = channels.get(chId);
                    if (ch == null) {
                        abort("Channel not found");
                    }
                }
                try {
                    SpdyConnection.readShort(iob);

                    HttpMessageBytes resBytes = ch.getResponse().getMsgBytes();

                    BBuffer head = processHeaders(iob, ch, resBytes);
                } catch (Throwable t) {
                    log.log(Level.SEVERE, "Error parsing head", t);
                    abort("Error reading headers " + t);
View Full Code Here

TOP

Related Classes of org.apache.tomcat.lite.http.HttpMessage.HttpMessageBytes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.