?
Solved

HTTPUnit and SSL questions

Posted on 2007-03-27
2
Medium Priority
?
670 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
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…
This video teaches viewers about errors in exception handling.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

762 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