jira-importer opened a new issue, #1374:
URL: https://github.com/apache/httpcomponents-core/issues/1374

   **[Sam 
Crawford](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=samcrawford)**
 opened 
**[HTTPCORE-228](https://issues.apache.org/jira/browse/HTTPCORE-228?redirect=false)**
 and commented
   
   When a client sends an entity-enclosing request, but does not include an 
entity, an IOReactorException is thrown which in turns terminates the server. 
The cause appears to be a missing null-check around line 317 in the following 
code:
   
   313         ConsumingNHttpEntity consumingEntity = 
connState.getConsumingEntity();
   314
   315         try {
   316
   317             consumingEntity.consumeContent(decoder, conn);
   318             if (decoder.isCompleted()) {
   319                 conn.suspendInput();
   320                 processRequest(conn, request);
   321             }
   
   The issue can be reproduced using the following:
   
   [sam@dev3 ~]$ curl -v -d "" https://proj.acmecorp.com/
   * About to connect() to proj.acmecorp.com port 443
   * Trying 192.168.254.22... connected
   * Connected to proj.acmecorp.com (192.168.254.22) port 443
   * SSL certificate verify ok.
   
   > POST / HTTP/1.1
   > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
   > Host: proj.acmecorp.com
   > Accept: \*/\*
   > Content-Length: 0
   > Content-Type: application/x-www-form-urlencoded
   
   (No response is ever received)
   
   Complete stacktrace:
   
   INFO com.acmecorp.proj.http.HttpSSLServer: Connection open: 
[proj.acmecorp.com/192.168.254.22:47992]
   ERROR com.acmecorp.proj.http.HttpSSLServer: I/O error
   org.apache.http.nio.reactor.IOReactorException: I/O dispatch worker 
terminated abnormally
   at 
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:326)
   at com.acmecorp.proj.http.HttpSSLServer$1.run(HttpSSLServer.java:162)
   Caused by: java.lang.NullPointerException
   at 
org.apache.http.nio.protocol.AsyncNHttpServiceHandler.inputReady(AsyncNHttpServiceHandler.java:317)
   at 
org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:179)
   at 
org.apache.http.impl.nio.SSLServerIOEventDispatch.inputReady(SSLServerIOEventDispatch.java:225)
   at 
org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:153)
   at 
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:314)
   at 
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:294)
   at 
org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:256)
   at 
org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:96)
   at 
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:556)
   at java.lang.Thread.run(Thread.java:619)
   INFO com.acmecorp.proj.http.HttpSSLServer: Shutdown HTTP server
   
   
   ---
   
   **Affects:** 4.0.1
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to