Package net.yacy.cora.protocol

Examples of net.yacy.cora.protocol.RequestHeader.containsKey()


       
        /*
         * doing some header validation here ...
         */
        String httpVersion = (String) prop.get(HeaderFramework.CONNECTION_PROP_HTTP_VER); if (httpVersion == null) httpVersion = "HTTP/0.9";
        if (httpVersion.equals("HTTP/1.1") && !header.containsKey(HeaderFramework.HOST)) {
            // the HTTP/1.1 specification requires that an HTTP/1.1 server must reject any 
            // HTTP/1.1 message that does not contain a Host header.           
            HTTPDemon.sendRespondError(prop,theSession.out,0,400,null,null,null);
            throw new IOException("400 Bad request");
        }    
View Full Code Here


        /*
         * doing some header validation here ...
         */
        String httpVersion = (String) prop.get(HeaderFramework.CONNECTION_PROP_HTTP_VER); if (httpVersion == null) httpVersion = "HTTP/0.9";
        if (httpVersion.equals("HTTP/1.1") && !header.containsKey(HeaderFramework.HOST)) {
            // the HTTP/1.1 specification requires that an HTTP/1.1 server must reject any
            // HTTP/1.1 message that does not contain a Host header.
            HTTPDemon.sendRespondError(prop,theSession.out,0,400,null,null,null);
            throw new IOException("400 Bad request");
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.