https://bz.apache.org/bugzilla/show_bug.cgi?id=58592

            Bug ID: 58592
           Summary: Org.apache.coyote.request scheme is null
           Product: Tomcat 7
           Version: 7.0.54
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: rashmikatag...@in.ibm.com

I work at IBM for IBM Integration Bus product. We use Tomcat 7 as servlet
container. When we receive request from client, the org.apache.coyote.request
object has "null" scheme. So when we try to get the scheme as req.scheme(), we
end up getting null.

The service looks like:
 public void service(
      org.apache.coyote.Request req,
      org.apache.coyote.Response res) throws Exception

We print the debug info as:

private void debugRequest(org.apache.coyote.Request req) 
    {
      System.out.println("========BEGIN TOMCAT DEBUG
INFO===============================");
      System.out.println("scheme:" + req.scheme().toString() + ":");
      System.out.println("method:" + req.method().toString() + ":");
      System.out.println("unparsedURI:" + req.unparsedURI().toString() + ":");
      System.out.println("requestURI:" + req.requestURI().toString() + ":");
      System.out.println("decodedURI:" + req.decodedURI().toString() + ":");
      System.out.println("queryString:" + req.queryString().toString() + ":");
      System.out.println("protocol:" + req.protocol().toString() + ":");
      System.out.println("serverName:" + req.serverName().toString() + ":");
      System.out.println("remoteAddr:" + req.remoteAddr().toString() + ":");
      System.out.println("remoteHost:" + req.remoteHost().toString() + ":");
      System.out.println("localName:" + req.localName().toString() + ":");
      System.out.println("localAddr:" + req.localAddr().toString() + ":");
      System.out.println("getServerPort:" + req.getServerPort() + ":");
      System.out.println("getRemotePort:" + req.getRemotePort() + ":");
      System.out.println("getLocalPort:" + req.getLocalPort() + ":");
      System.out.println("getCharacterEncoding:" + req.getCharacterEncoding() +
":");
      System.out.println("getContentLength:" + req.getContentLength() + ":");
      System.out.println("getContentType:" + req.getContentType() + ":");
      System.out.println("getCookies:" + req.getCookies().toString() + ":");
     
//System.out.println("getParameters:"+req.getParameters().paramsAsString()+":");
      System.out.println("========--END TOMCAT DEBUG
INFO===============================");
    }


The debug output is:

2015-11-06 14:31:27.919     35 ========BEGIN TOMCAT DEBUG
INFO===============================
2015-11-06 14:31:27.919     35 scheme:null:
2015-11-06 14:31:27.920     35 method:POST:
2015-11-06 14:31:27.920     35 unparsedURI:/httpservice:
2015-11-06 14:31:27.920     35 requestURI:/httpservice:
2015-11-06 14:31:27.921     35 decodedURI:null:
2015-11-06 14:31:27.921     35 queryString:null:
2015-11-06 14:31:27.921     35 protocol:HTTP/1.1:
2015-11-06 14:31:27.922     35 serverName:localhost:
2015-11-06 14:31:27.922     35 remoteAddr:127.0.0.1:
2015-11-06 14:31:27.922     35 remoteHost:null:
2015-11-06 14:31:27.923     35 localName:null:
2015-11-06 14:31:27.923     35 localAddr:null:
2015-11-06 14:31:27.923     35 getServerPort:7800:
2015-11-06 14:31:27.924     35 getRemotePort:54064:
2015-11-06 14:31:27.924     35 getLocalPort:-1:
2015-11-06 14:31:27.924     35 getCharacterEncoding:null:
2015-11-06 14:31:27.925     35 getContentLength:2:
2015-11-06 14:31:27.925     35 getContentType:null:
2015-11-06 14:31:27.926     35 getCookies:=== Cookies ===
:
2015-11-06 14:31:27.926     35 ========--END TOMCAT DEBUG
INFO===============================

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to