Solved

HTTPUnit and SSL questions

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
firstswap challenge 20 77
CONDITIONAL MAX STATEMENT IN T-SQL 3 59
Work with App store 7 52
Math Equation 23 88
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

809 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