Solved

HTTPUnit and SSL questions

Posted on 2007-03-27
2
652 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

830 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