tonyxiahua / sandrop

Automatically exported from code.google.com/p/sandrop
0 stars 0 forks source link

parts of request for some header returns null #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Plugin.fetchResponse(Request request)
          Response response = _in.fetchResponse(request);
          response.getContent();

   For some percent of chances, fetchResponse throws Exception

******************************************************
java.io.IOException: No data received from the server
  at org.sandrop.webscarab.model.Response.read(Response.java:88)
  at org.sandrop.webscarab.httpclient.URLFetcher.fetchResponse(URLFetcher.java:317)
  at org.sandrop.webscarab.plugin.proxy.BrowserCache$Plugin.fetchResponse(BrowserCache.java:88)
  at org.sandrop.webscarab.plugin.proxy.RevealHidden$Plugin.fetchResponse(RevealHidden.java:94)
  at org.sandroproxy.proxy.plugin.CustomPlugin$Plugin.fetchResponse(CustomPlugin.java:169)
  at org.sandrop.webscarab.plugin.proxy.ConnectionHandler.run(ConnectionHandler.java:469)
******************************************************

   For some percent of chances, fetchResponse throws Exception

******************************************************
java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
  at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:552)
  at libcore.io.IoBridge.recvfrom(IoBridge.java:516)
  at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
  at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
  at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
  at libcore.io.Streams.readSingleByte(Streams.java:41)
  at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:236)
  at org.sandrop.webscarab.model.Message.readLine(Message.java:580)
  at org.sandrop.webscarab.model.Response.read(Response.java:86)
  at org.sandrop.webscarab.httpclient.URLFetcher.fetchResponse(URLFetcher.java:317)
  at org.sandrop.webscarab.plugin.proxy.BrowserCache$Plugin.fetchResponse(BrowserCache.java:88)
  at org.sandrop.webscarab.plugin.proxy.RevealHidden$Plugin.fetchResponse(RevealHidden.java:94)
  at org.sandroproxy.proxy.plugin.CustomPlugin$Plugin.fetchResponse(CustomPlugin.java:169)
******************************************************

Is there any bug in socket connection management?

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

: SandroProxyV1.5.93 :

Please provide any additional information below.

Original issue reported on code.google.com by harr...@gmail.com on 4 Mar 2014 at 9:11

GoogleCodeExporter commented 8 years ago
Please ignore the title.
At first I found getHeader returns null, but by the time i fount getContent 
return 0 length. I think it is because the connection failed.

Original comment by harr...@gmail.com on 4 Mar 2014 at 9:15

GoogleCodeExporter commented 8 years ago

Okey. Check out also issue 101.

http://code.google.com/p/sandrop/issues/detail?id=101

Recently changes were made about how to handle if server disconnects to early.
You can check this requests on pc with chrome devtools. They are marked red.

Maybe you have similar case.
If not, please send how to reproduce your behavior.
And try with latest version 1.5.103

Original comment by supp.san...@gmail.com on 4 Mar 2014 at 9:19

GoogleCodeExporter commented 8 years ago
Whole exception stack
*************************************************
Get response failed...@2
java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
  at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:552)
  at libcore.io.IoBridge.recvfrom(IoBridge.java:516)
  at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
  at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
  at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
  at libcore.io.Streams.readSingleByte(Streams.java:41)
  at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:236)
  at org.sandrop.webscarab.model.Message.readLine(Message.java:580)
  at org.sandrop.webscarab.model.Response.read(Response.java:86)
  at org.sandrop.webscarab.httpclient.URLFetcher.fetchResponse(URLFetcher.java:317)
  at org.sandrop.webscarab.plugin.proxy.BrowserCache$Plugin.fetchResponse(BrowserCache.java:88)
  at org.sandrop.webscarab.plugin.proxy.RevealHidden$Plugin.fetchResponse(RevealHidden.java:94)
  at org.sandroproxy.proxy.plugin.CustomPlugin$Plugin.fetchResponse(CustomPlugin.java:169)
  at org.sandrop.webscarab.plugin.proxy.ConnectionHandler.run(ConnectionHandler.java:469)
  at java.lang.Thread.run(Thread.java:856)
Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection 
reset by peer)
  at libcore.io.Posix.recvfromBytes(Native Method)
  at libcore.io.Posix.recvfrom(Posix.java:131)
  at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
  at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
  ... 13 more
Get response failed...@1
java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
  at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:552)
  at libcore.io.IoBridge.recvfrom(IoBridge.java:516)
  at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
  at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
  at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
  at libcore.io.Streams.readSingleByte(Streams.java:41)
  at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:236)
  at org.sandrop.webscarab.model.Message.readLine(Message.java:580)
  at org.sandrop.webscarab.model.Response.read(Response.java:86)
  at org.sandrop.webscarab.httpclient.URLFetcher.fetchResponse(URLFetcher.java:317)
  at org.sandrop.webscarab.plugin.proxy.BrowserCache$Plugin.fetchResponse(BrowserCache.java:88)
  at org.sandrop.webscarab.plugin.proxy.RevealHidden$Plugin.fetchResponse(RevealHidden.java:94)
  at org.sandroproxy.proxy.plugin.CustomPlugin$Plugin.fetchResponse(CustomPlugin.java:169)
  at org.sandrop.webscarab.plugin.proxy.ConnectionHandler.run(ConnectionHandler.java:469)
  at java.lang.Thread.run(Thread.java:856)
Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection 
reset by peer)
  at libcore.io.Posix.recvfromBytes(Native Method)
  at libcore.io.Posix.recvfrom(Posix.java:131)
  at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
  at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
  ... 13 more

*************************************************

Original comment by harr...@gmail.com on 4 Mar 2014 at 9:23

GoogleCodeExporter commented 8 years ago
OK, I will try it.
thanks~~~~~

Original comment by harr...@gmail.com on 4 Mar 2014 at 9:24

GoogleCodeExporter commented 8 years ago
Problem resoved in latest version App.
Please close it.

Original comment by harr...@gmail.com on 5 Mar 2014 at 6:27

GoogleCodeExporter commented 8 years ago

Original comment by supp.san...@gmail.com on 5 Mar 2014 at 6:40