Examples of RequestLine


Examples of com.baulsupp.kolja.log.viewer.request.RequestLine

    }
  }

  private void selectRequest() {
    if (requestIndex != null) {
      RequestLine l = RequestDialog.getValue(requestIndex, list.getOffset());

      if (l != null) {
        log.info("selected " + l + " moving to " + l.getOffset());
        requestHighlight.setValue(l.getIdentifier());
        list.moveTo(l.getMinimumKnownOffset());
      } else {
        log.info("no request selected");
      }
    }
  }
View Full Code Here

Examples of gov.nist.javax.sip.header.RequestLine

    public void setRequestURI(URI uri) {
        if ( uri == null ) {
            throw new NullPointerException("Null request URI");
        }
        if (this.requestLine == null) {
            this.requestLine = new RequestLine();
        }
        this.requestLine.setUri((GenericURI) uri);
        this.nullRequest = false;
    }
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

        public boolean processRequest(
            final SimpleHttpServerConnection conn,
            final SimpleRequest request) throws IOException
        {
            RequestLine requestLine = request.getRequestLine();
            ResponseWriter out = conn.getWriter();
            if ("GET".equals(requestLine.getMethod())
                && "/".equals(requestLine.getUri())) {

                requestNo++;

                out.println("HTTP/1.1 200 OK");
                out.println("Content-Type: text/html");
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

        }

        public boolean process(final SimpleRequest request, final SimpleResponse response)
            throws IOException
        {
            RequestLine requestLine = request.getRequestLine();
            HttpVersion ver = requestLine.getHttpVersion();
            Header auth = request.getFirstHeader("Authorization");
            if (auth == null) {
                response.setStatusLine(ver, HttpStatus.SC_UNAUTHORIZED);
                response.addHeader(new Header("WWW-Authenticate",
                        "Digest realm=\"realm1\", nonce=\"ABC123\""));
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

            }

            public boolean process(final SimpleRequest request, final SimpleResponse response)
                throws IOException
            {
                RequestLine reqline = request.getRequestLine();
                HttpVersion ver = reqline.getHttpVersion();
                if (reqline.getUri().equals("/oldlocation/")) {
                    response.setStatusLine(ver, this.statuscode);
                    response.addHeader(new Header("Location",
                            "http://" + this.host + ":" + this.port + "/newlocation/"));
                    response.addHeader(new Header("Connection", "close"));
                } else if (reqline.getUri().equals("/newlocation/")) {
                    response.setStatusLine(ver, HttpStatus.SC_OK);
                    response.setBodyString("Successful redirect");
                } else {
                    response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
                }
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

        }
       
        public boolean process(final SimpleRequest request, final SimpleResponse response)
            throws IOException
        {
            RequestLine reqline = request.getRequestLine();
            HttpVersion ver = reqline.getHttpVersion();
            if (reqline.getUri().startsWith("/circular-oldlocation")) {
                response.setStatusLine(ver, HttpStatus.SC_MOVED_TEMPORARILY);
                response.addHeader(new Header("Location", "/circular-location2?invk=" + (++this.invocations)));
            } else if (reqline.getUri().startsWith("/circular-location2")) {
                response.setStatusLine(ver, HttpStatus.SC_MOVED_TEMPORARILY);
                response.addHeader(new Header("Location", "/circular-oldlocation?invk=" + (++this.invocations)));
            } else {
                response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
            }
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

            }

            public boolean process(final SimpleRequest request, final SimpleResponse response)
                throws IOException
            {
                RequestLine reqline = request.getRequestLine();
                HttpVersion ver = reqline.getHttpVersion();
                if (reqline.getUri().equals("/oldlocation/")) {
                    response.setStatusLine(ver, HttpStatus.SC_MOVED_TEMPORARILY);
                    response.addHeader(new Header("Location", "/relativelocation/"));
                } else if (reqline.getUri().equals("/relativelocation/")) {
                    response.setStatusLine(ver, HttpStatus.SC_OK);
                    response.setBodyString("Successful redirect");
                } else {
                    response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
                }
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

            }

            public boolean process(final SimpleRequest request, final SimpleResponse response)
                throws IOException
            {
                RequestLine reqline = request.getRequestLine();
                HttpVersion ver = reqline.getHttpVersion();
                if (reqline.getUri().equals("/oldlocation/")) {
                    response.setStatusLine(ver, HttpStatus.SC_MOVED_TEMPORARILY);
                    response.addHeader(new Header("Location", "xxx://bogus"));
                } else if (reqline.getUri().equals("/relativelocation/")) {
                    response.setStatusLine(ver, HttpStatus.SC_OK);
                    response.setBodyString("Successful redirect");
                } else {
                    response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
                }
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

        public boolean processRequest(
            final SimpleHttpServerConnection conn,
            final SimpleRequest request) throws IOException
        {
            RequestLine requestLine = request.getRequestLine();
            ResponseWriter out = conn.getWriter();
            if ("GET".equals(requestLine.getMethod())
                && "/".equals(requestLine.getUri())) {

                requestNo++;

                out.println("HTTP/1.1 200 OK");
                out.println("Content-Type: text/html");
View Full Code Here

Examples of org.apache.commons.httpclient.server.RequestLine

        }

        public boolean process(final SimpleRequest request, final SimpleResponse response)
            throws IOException
        {
            RequestLine reqline = request.getRequestLine();
            if (reqline.getUri().equals("/circular-location1/")) {
                response.setStatusLine("HTTP/1.1 302 Object moved");
                response.addHeader(new Header("Location", "/circular-location2/"));
            } else if (reqline.getUri().equals("/circular-location2/")) {
                response.setStatusLine("HTTP/1.1 302 Object moved");
                response.addHeader(new Header("Location", "/circular-location1/"));
            } else {
                response.setStatusLine("HTTP/1.1 404 Not Found");
            }
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.