ashishpnd7 / sandrop

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

org.sandrop.webscarab.model.Message.setContent(byte[] bytes) always failed #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.when calling: org.sandrop.webscarab.model.Message.setContent(byte[] bytes)
src code shows as follow:
#        if (_gzipped) {
#            try {
#                _content = new MessageOutputStream();
#                GZIPOutputStream gzos = new GZIPOutputStream(_content);
#                gzos.write(bytes);
#                gzos.close();

Here, gzos.close() will cause _content.close() being called immediately.
So _content will always be empty when Message.setContent(byte[]) returns.

I think it not the function suppose to be.

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

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


Please provide any additional information below.

Original issue reported on code.google.com by `harr...@gmail.com` on 17 Jan 2014 at 10:57
GoogleCodeExporter commented 9 years ago
Yes, this could be bug. Will change asap.

Original comment by supp.san...@gmail.com on 17 Jan 2014 at 11:21

GoogleCodeExporter commented 9 years ago

Original comment by supp.san...@gmail.com on 18 Jan 2014 at 12:32

GoogleCodeExporter commented 9 years ago
It should be in next version on Google play.
Sources are also updated:
http://code.google.com/p/sandrop/source/detail?r=3366d1c2c1ff889cd5775e5bc95be93
d589639e4

Original comment by supp.san...@gmail.com on 18 Jan 2014 at 1:43

GoogleCodeExporter commented 9 years ago
Great~~~

Original comment by harr...@gmail.com on 19 Jan 2014 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by supp.san...@gmail.com on 23 Jan 2014 at 8:01

GoogleCodeExporter commented 9 years ago
I'm writing a plugin to rewrite the response from server and setContent() 
always failed. After I replaced "gzos.close()" by "gzos.finish()" and it works.

http://docs.oracle.com/javase/7/docs/api/java/util/zip/GZIPOutputStream.html
"Finishes writing compressed data to the output stream without closing the 
underlying stream. Use this method when applying multiple filters in succession 
to the same output stream."

Original comment by lok0...@gmail.com on 20 Feb 2014 at 6:52

GoogleCodeExporter commented 9 years ago
Thanks for reporting it. Will change it asap.

Original comment by supp.san...@gmail.com on 20 Feb 2014 at 7:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

https://play.google.com/apps/testing/org.sandroproxy
sandroproxy-beta-test@googlegroups.com

Beta version (1.5.102) of app to test it.

Original comment by supp.san...@gmail.com on 20 Feb 2014 at 8:00

GoogleCodeExporter commented 9 years ago
Tested the beta version and it works now.
Thank you for your quick response.

Original comment by lok0...@gmail.com on 21 Feb 2014 at 1:18

GoogleCodeExporter commented 9 years ago

Original comment by supp.san...@gmail.com on 28 Feb 2014 at 4:47