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

   **[John B. 
Hansen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=wvdf96a)** 
opened 
**[HTTPCORE-241](https://issues.apache.org/jira/browse/HTTPCORE-241?redirect=false)**
 and commented
   
   I'm a new user with HttpCore and didn't know where else to turn for 
support.. And, this problem may be my fault...
   Just looking for some suggestions...
   
   I'm doing a ProxyServer by using a variation of ElementalHttpServer  to send 
a request to proxy code.
   The proxy code then makes an actual client request to the target site. The 
proxy request gets a response
   back and sets the statusline, headers, and entity back in the original 
response in the  handler  (which sends
   it back to the Browser).
   
   For simple HTML sites, this works fine. But, on chunked sites 
(transfer-encoding=chunked) e.g. www.google.com
   I'm getting a "Socket Exception: Bad File Number" following the first 
response back to the browser i.e.
   
   11-17 13:48:05.307: ERROR/MTHttpProxy:(2767): proxyResponse entity is CHUNKED
   11-17 13:48:05.307: ERROR/MTHttpProxy:(2767): proxyResponse entity is 
STREAMING
   11-17 13:48:05.307: ERROR/MTHttpProxy:(2767): ======================= Done 
Handling Request-Response =======================
   11-17 13:48:05.317: ERROR/MTHttpProxy:(2767): ERROR: I/O error from call to 
handle request: Bad file number
   11-17 13:48:05.317: WARN/System.err(2767): java.net.SocketException: Bad 
file number
   11-17 13:48:05.327: WARN/System.err(2767):     at 
org.apache.harmony.luni.platform.OSNetworkSystem.readSocketImpl(Native Method)
   11-17 13:48:05.327: WARN/System.err(2767):     at 
org.apache.harmony.luni.platform.OSNetworkSystem.read(OSNetworkSystem.java:358)
   11-17 13:48:05.327: WARN/System.err(2767):     at 
org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:561)
   11-17 13:48:05.327: WARN/System.err(2767):     at 
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:88)
   11-17 13:48:05.327: WARN/System.err(2767):     at 
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
   11-17 13:48:05.327: WARN/System.err(2767):     at 
org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)
   11-17 13:48:05.337: WARN/System.err(2767):     at 
org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:161)
   11-17 13:48:05.337: WARN/System.err(2767):     at 
org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:175)
   11-17 13:48:05.337: WARN/System.err(2767):     at 
org.apache.http.entity.BasicHttpEntity.writeTo(BasicHttpEntity.java:129)
   11-17 13:48:05.337: WARN/System.err(2767):     at 
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:97)
   11-17 13:48:05.337: WARN/System.err(2767):     at 
org.apache.http.impl.AbstractHttpServerConnection.sendResponseEntity(AbstractHttpServerConnection.java:182)
   11-17 13:48:05.337: WARN/System.err(2767):     at 
org.apache.http.protocol.HttpService.handleRequest(HttpService.java:209)
   11-17 13:48:05.337: WARN/System.err(2767):     at 
com.test.MultiHttpProxy$WorkerThread.run(MultiHttpProxy.java:446)
   
   BTW: I have no reason to suspect bugs in the Chunk handling. I'm just not 
seeing this on the few non-chunked sites I've tested.
   
   Any ideas what could be wrong or how to debug? Any advice 
appreciated....Thanks!
   
   PS, if anyone can clarify the version of HttpComponents on Android 2.2 also, 
that would be great. Thx.
   
   
   ---
   No further details from 
[HTTPCORE-241](https://issues.apache.org/jira/browse/HTTPCORE-241?redirect=false)


-- 
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