Solved

HTTPUnit and SSL questions

Posted on 2007-03-27
2
662 Views
Last Modified: 2012-08-14
Hi, there!

I am testing a SSL page with HTTP unit. I am not sure what kind of certificator we are using. But most probably from verisign.
But the does give following error:
java.io.EOFException: Unexpected end of ZLIB input stream.
Same codes is runnable against normally HTTP request.
My code is below:
 WebRequest request = new PostMethodWebRequest(firstPage);
WebResponse response = wc.getResponse(request);

0
Comment
Question by:JianJunShen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
ADSLMark earned 500 total points
ID: 18798477
You are running into the problem that HttpUnit wants to deflate a gzipped page, while the zlib input stream doesn't work correctly (not your fault).
Here is another discussion about same problem:

http://www.arcknowledge.com/gmane.comp.web.httpunit.devel/2005-06/msg00039.html

it suggests to set to set the client property for accepting gzip to false:

ClientProperties.setAcceptGzip(boolean acceptGzip)

Another idea would be to catch the EOFException and just continue.
I hope it helps,

Mark
0
 

Author Comment

by:JianJunShen
ID: 18798758
HI, there!

Absolutely correct. If you want more points, please let me know. I could create another questions for you to answer.

Best regards,
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question