Thanks Oleg,
A success trace and a failure trace are below. Quick description of the
test system:
- These tests are run through HtmlUnit wrapped around HttpClient, but I can
strip that away and write a fresh thin wrapper to HttpClient if things look
fishy.
- in the HtmlUnit source, I have added:
httpClient.getParams().setVirtualHost("dan.mydomain.com");
when it creates the HttpClient object
- Step one of the test is to load a page which uses client side JS to set a
cookie:
document.cookie = "TEST_COOKIE=HEREIAM;path=/;domain=.mydomain.com";
- Step two of the test clicks on a link to a JSP page which prints out all
of the visible cookies -- using server side request.getCookies()
- If it finds that cookie then it is a success, if it does not it is a
failure
- Test one I am using URL base 'dan.mydomain.com' which has been set in my
etc/hosts file to my local IP
- Test two I am using URL base '10.10.198.225' which is that local IP
- both tests are directed at port 7001 for my local WebLogic server
- Test one succeeds in showing the cookie on step two, Test two fails.
here are the traces -- I used the config named "Enable full wire(header and
content) + context logging" on the "Logging Practices" page.
===========================================
TEST ONE TRACE (dan.mydomain.com - SUCCESS)
===========================================
[DEBUG] org.apache.commons.httpclient.HttpClient - Java version: 1.4.2_06
[DEBUG] org.apache.commons.httpclient.HttpClient - Java vendor: Sun
Microsystems Inc.
[DEBUG] org.apache.commons.httpclient.HttpClient - Java class path:
.;lib/commons-beanutils-1.7.0.jar;lib/commons-cli-1.0.jar;lib/commons-codec-
1.3.jar;lib/commons-collections-3.1.jar;lib/commons-httpclient-3.0-beta1.jar
;lib/commons-io-1.0.jar;lib/commons-jelly-1.0-RC1.jar;lib/commons-jelly-tags
-log-1.0.jar;lib/commons-jexl-1.0.jar;lib/commons-lang-2.0.jar;lib/commons-l
ogging-1.0.4.jar;lib/dom4j-1.5.jar;lib/jaxen-1.0-FCS-full.jar;lib/js-1.6R1.j
ar;lib/junit.jar;lib/log4j-1.2.9.jar;lib/nekohtml-0.9.4.jar;lib/saxpath-1.0-
FCS.jar;lib/velocity-dep-1.4.jar;lib/htmlunit-NextRelease.jar;lib/xercesImpl
-2.6.2.jar;lib/xmlParserAPIs-2.2.1.jar
[DEBUG] org.apache.commons.httpclient.HttpClient - Operating system name:
Windows XP
[DEBUG] org.apache.commons.httpclient.HttpClient - Operating system
architecture: x86
[DEBUG] org.apache.commons.httpclient.HttpClient - Operating system
version: 5.1
[DEBUG] org.apache.commons.httpclient.HttpClient - SUN 1.42: SUN (DSA
key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom;
X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX
CertPathBuilder; LDAP, Collection CertStores)
[DEBUG] org.apache.commons.httpclient.HttpClient - SunJSSE 1.42: Sun JSSE
provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories,
SSLv3, TLSv1)
[DEBUG] org.apache.commons.httpclient.HttpClient - SunRsaSign 1.42: SUN's
provider for RSA signatures
[DEBUG] org.apache.commons.httpclient.HttpClient - SunJCE 1.42: SunJCE
Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman,
HMAC-MD5, HMAC-SHA1)
[DEBUG] org.apache.commons.httpclient.HttpClient - SunJGSS 1.0: Sun
(Kerberos v5)
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.useragent = Jakarta Commons-HttpClient/3.0-beta1
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.version = HTTP/1.1
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.connection-manager.class = class
org.apache.commons.httpclient.SimpleHttpConnectionManager
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.cookie-policy = rfc2109
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.element-charset = US-ASCII
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.content-charset = ISO-8859-1
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.method.retry-handler =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE,
dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss
z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy
HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE
dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z,
EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.authentication.credential-provider =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.socket.timeout = 0
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.connection.timeout = 0
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.virtual-host = dan.mydomain.com
[DEBUG] org.apache.commons.httpclient.methods.GetMethod - enter
GetMethod(String)
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.method.retry-handler =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HttpMethod)
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
[DEBUG] org.apache.commons.httpclient.HttpMethodDirector - Attempt number 1
to process request
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.open()
[DEBUG] org.apache.commons.httpclient.HttpConnection - Open connection to
dan.mydomain.com:7001
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.execute(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequest(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.generateRequestLine(HttpConnection, String, String, String,
String)
[DEBUG] httpclient.wire.header - >> "GET /cookietest/setCookie.htm
HTTP/1.1[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Using virtual host
name: dan.mydomain.com
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Adding Host request
header
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.getCookies()
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.match(String, int, String, boolean, Cookie[])
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
[DEBUG] httpclient.wire.header - >> "User-Agent: Mozilla/4.0 (compatible;
MSIE 6.0b; Windows 98)[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] httpclient.wire.header - >> "Host: dan.mydomain.com:7001[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.writeLine()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] httpclient.wire.header - >> "[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponse(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readStatusLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.readLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HeaderParser.parseHeaders(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "Date: Tue, 03 May 2005 00:25:00
GMT[\r][\n]"
[DEBUG] httpclient.wire.header - << "Server: WebLogic Server 8.1 SP2 Fri
Dec 5 15:01:51 PST 2003 316284[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Length: 222[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Type: text/html[\r][\n]"
[DEBUG] httpclient.wire.header - << "Last-Modified: Tue, 03 May 2005
00:10:43 GMT[\r][\n]"
[DEBUG] httpclient.wire.header - << "Accept-Ranges: bytes[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.processResponseHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
getContentCharSet( Header contentheader )
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(String)
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(char[])
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.getParameterByName(String)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Default charset
used: ISO-8859-1
[DEBUG] httpclient.wire.content - << "<html>[\r][\n]"
[DEBUG] httpclient.wire.content - << "<script
language="javascript">[\r][\n]"
[DEBUG] httpclient.wire.content - << "document.cookie =
"TEST_COOKIE=HEREIAM;path=/;domain=.mydomain.com";[\r][\n]"
[DEBUG] httpclient.wire.content - << "</script>[0x9][\r][\n]"
[DEBUG] httpclient.wire.content - << "<title>set cookie</title>[\r][\n]"
[DEBUG] httpclient.wire.content - << "<P>[\r][\n]"
[DEBUG] httpclient.wire.content - << "[0x9]now check cookies <a
href="getCookie.jsp">here</a>[\r][\n]"
[DEBUG] httpclient.wire.content - << "</P>[\r][\n]"
[DEBUG] httpclient.wire.content - << "</html>[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Resorting to
protocol version default close connection policy
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Should NOT close
connection, using HTTP/1.1
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.isResponseAvailable()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.releaseConnection()
[DEBUG] org.apache.commons.httpclient.HttpConnection - Releasing connection
back to connection manager.
[DEBUG] org.apache.commons.httpclient.Cookie - enter Cookie(String, String,
String, String, Date, boolean)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.addCookie(Cookie)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.formatCookie(Cookie)
[INFO] com.myapp.test - follow the link to go check cookies
[DEBUG] org.apache.commons.httpclient.methods.GetMethod - enter
GetMethod(String)
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.method.retry-handler =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HttpMethod)
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
[DEBUG] org.apache.commons.httpclient.HttpMethodDirector - Attempt number 1
to process request
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.execute(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequest(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.generateRequestLine(HttpConnection, String, String, String,
String)
[DEBUG] httpclient.wire.header - >> "GET /cookietest/getCookie.jsp
HTTP/1.1[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Using virtual host
name: dan.mydomain.com
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Adding Host request
header
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.getCookies()
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.match(String, int, String, boolean, Cookie[])
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.match(String, int, String, boolean, Cookie
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.formatCookie(Cookie)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.formatCookieAsVer(Cookie)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
[DEBUG] httpclient.wire.header - >> "User-Agent: Mozilla/4.0 (compatible;
MSIE 6.0b; Windows 98)[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] httpclient.wire.header - >> "Host: dan.mydomain.com:7001[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] httpclient.wire.header - >> "Cookie: $Version=0;
TEST_COOKIE=HEREIAM[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.writeLine()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] httpclient.wire.header - >> "[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponse(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readStatusLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.readLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HeaderParser.parseHeaders(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "Date: Tue, 03 May 2005 00:25:01
GMT[\r][\n]"
[DEBUG] httpclient.wire.header - << "Server: WebLogic Server 8.1 SP2 Fri
Dec 5 15:01:51 PST 2003 316284[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Length: 83[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Type: text/html[\r][\n]"
[DEBUG] httpclient.wire.header - << "Set-Cookie:
JSESSIONID=C2EdelK8kC2qq6EWjGYx8fpr8EYjcYbozHyOxkln9kFkUnsjHjJy!-1295899335;
path=/[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.processResponseHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.parse(String, port, path, boolean, String)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.parse(String, port, path, boolean, Header)
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(char[])
[DEBUG] org.apache.commons.httpclient.Cookie - enter Cookie(String, String,
String, String, Date, boolean)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.validate(String, int, String, boolean, Cookie)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.validate(String, port, path, boolean, Cookie)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.addCookie(Cookie)
[DEBUG] org.apache.commons.httpclient.Cookie - enter Cookie.equals(Object)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.formatCookie(Cookie)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.formatCookieAsVer(Cookie)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Cookie accepted:
"$Version=0;
JSESSIONID=C2EdelK8kC2qq6EWjGYx8fpr8EYjcYbozHyOxkln9kFkUnsjHjJy!-1295899335;
$Path=/"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
getContentCharSet( Header contentheader )
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(String)
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(char[])
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.getParameterByName(String)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Default charset
used: ISO-8859-1
[DEBUG] httpclient.wire.content - << "<html>[\r][\n]"
[DEBUG] httpclient.wire.content - << "<title>get cookie</title>[\r][\n]"
[DEBUG] httpclient.wire.content - << "$Version-0<P>[\n]"
[DEBUG] httpclient.wire.content - << "TEST_COOKIE-HEREIAM<P>[\n]"
[DEBUG] httpclient.wire.content - << "[\r][\n]"
[DEBUG] httpclient.wire.content - << "</html>[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Resorting to
protocol version default close connection policy
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Should NOT close
connection, using HTTP/1.1
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.isResponseAvailable()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.releaseConnection()
[DEBUG] org.apache.commons.httpclient.HttpConnection - Releasing connection
back to connection manager.
[INFO] com.myapp.test - test succeeds!
===
===
====================================
TEST TWO TRACE (10.10.198.225 - FAIL
====================================
[DEBUG] org.apache.commons.httpclient.HttpClient - Java version: 1.4.2_06
[DEBUG] org.apache.commons.httpclient.HttpClient - Java vendor: Sun
Microsystems Inc.
[DEBUG] org.apache.commons.httpclient.HttpClient - Java class path:
.;lib/commons-beanutils-1.7.0.jar;lib/commons-cli-1.0.jar;lib/commons-codec-
1.3.jar;lib/commons-collections-3.1.jar;lib/commons-httpclient-3.0-beta1.jar
;lib/commons-io-1.0.jar;lib/commons-jelly-1.0-RC1.jar;lib/commons-jelly-tags
-log-1.0.jar;lib/commons-jexl-1.0.jar;lib/commons-lang-2.0.jar;lib/commons-l
ogging-1.0.4.jar;lib/dom4j-1.5.jar;lib/jaxen-1.0-FCS-full.jar;lib/js-1.6R1.j
ar;lib/junit.jar;lib/log4j-1.2.9.jar;lib/nekohtml-0.9.4.jar;lib/saxpath-1.0-
FCS.jar;lib/velocity-dep-1.4.jar;lib/htmlunit-NextRelease.jar;lib/xercesImpl
-2.6.2.jar;lib/xmlParserAPIs-2.2.1.jar
[DEBUG] org.apache.commons.httpclient.HttpClient - Operating system name:
Windows XP
[DEBUG] org.apache.commons.httpclient.HttpClient - Operating system
architecture: x86
[DEBUG] org.apache.commons.httpclient.HttpClient - Operating system
version: 5.1
[DEBUG] org.apache.commons.httpclient.HttpClient - SUN 1.42: SUN (DSA
key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom;
X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX
CertPathBuilder; LDAP, Collection CertStores)
[DEBUG] org.apache.commons.httpclient.HttpClient - SunJSSE 1.42: Sun JSSE
provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories,
SSLv3, TLSv1)
[DEBUG] org.apache.commons.httpclient.HttpClient - SunRsaSign 1.42: SUN's
provider for RSA signatures
[DEBUG] org.apache.commons.httpclient.HttpClient - SunJCE 1.42: SunJCE
Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman,
HMAC-MD5, HMAC-SHA1)
[DEBUG] org.apache.commons.httpclient.HttpClient - SunJGSS 1.0: Sun
(Kerberos v5)
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.useragent = Jakarta Commons-HttpClient/3.0-beta1
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.version = HTTP/1.1
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.connection-manager.class = class
org.apache.commons.httpclient.SimpleHttpConnectionManager
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.cookie-policy = rfc2109
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.element-charset = US-ASCII
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.content-charset = ISO-8859-1
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.method.retry-handler =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE,
dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss
z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy
HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE
dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z,
EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.authentication.credential-provider =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.socket.timeout = 0
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.connection.timeout = 0
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.virtual-host = dan.mydomain.com
[DEBUG] org.apache.commons.httpclient.methods.GetMethod - enter
GetMethod(String)
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.method.retry-handler =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HttpMethod)
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
[DEBUG] org.apache.commons.httpclient.HttpMethodDirector - Attempt number 1
to process request
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.open()
[DEBUG] org.apache.commons.httpclient.HttpConnection - Open connection to
10.10.198.225:7001
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.execute(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequest(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.generateRequestLine(HttpConnection, String, String, String,
String)
[DEBUG] httpclient.wire.header - >> "GET /cookietest/setCookie.htm
HTTP/1.1[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Using virtual host
name: dan.mydomain.com
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Adding Host request
header
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.getCookies()
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.match(String, int, String, boolean, Cookie[])
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
[DEBUG] httpclient.wire.header - >> "User-Agent: Mozilla/4.0 (compatible;
MSIE 6.0b; Windows 98)[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] httpclient.wire.header - >> "Host: dan.mydomain.com:7001[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.writeLine()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] httpclient.wire.header - >> "[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponse(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readStatusLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.readLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HeaderParser.parseHeaders(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "Date: Tue, 03 May 2005 00:27:10
GMT[\r][\n]"
[DEBUG] httpclient.wire.header - << "Server: WebLogic Server 8.1 SP2 Fri
Dec 5 15:01:51 PST 2003 316284[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Length: 222[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Type: text/html[\r][\n]"
[DEBUG] httpclient.wire.header - << "Last-Modified: Tue, 03 May 2005
00:10:43 GMT[\r][\n]"
[DEBUG] httpclient.wire.header - << "Accept-Ranges: bytes[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.processResponseHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
getContentCharSet( Header contentheader )
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(String)
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(char[])
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.getParameterByName(String)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Default charset
used: ISO-8859-1
[DEBUG] httpclient.wire.content - << "<html>[\r][\n]"
[DEBUG] httpclient.wire.content - << "<script
language="javascript">[\r][\n]"
[DEBUG] httpclient.wire.content - << "document.cookie =
"TEST_COOKIE=HEREIAM;path=/;domain=.mydomain.com";[\r][\n]"
[DEBUG] httpclient.wire.content - << "</script>[0x9][\r][\n]"
[DEBUG] httpclient.wire.content - << "<title>set cookie</title>[\r][\n]"
[DEBUG] httpclient.wire.content - << "<P>[\r][\n]"
[DEBUG] httpclient.wire.content - << "[0x9]now check cookies <a
href="getCookie.jsp">here</a>[\r][\n]"
[DEBUG] httpclient.wire.content - << "</P>[\r][\n]"
[DEBUG] httpclient.wire.content - << "</html>[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Resorting to
protocol version default close connection policy
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Should NOT close
connection, using HTTP/1.1
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.isResponseAvailable()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.releaseConnection()
[DEBUG] org.apache.commons.httpclient.HttpConnection - Releasing connection
back to connection manager.
[DEBUG] org.apache.commons.httpclient.Cookie - enter Cookie(String, String,
String, String, Date, boolean)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.addCookie(Cookie)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.formatCookie(Cookie)
[INFO] com.myapp.test - follow the link to go check cookies
[DEBUG] org.apache.commons.httpclient.methods.GetMethod - enter
GetMethod(String)
[DEBUG] org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.method.retry-handler =
[EMAIL PROTECTED]
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HttpMethod)
[DEBUG] org.apache.commons.httpclient.HttpClient - enter
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
[DEBUG] org.apache.commons.httpclient.HttpMethodDirector - Attempt number 1
to process request
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.execute(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequest(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.generateRequestLine(HttpConnection, String, String, String,
String)
[DEBUG] httpclient.wire.header - >> "GET /cookietest/getCookie.jsp
HTTP/1.1[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Using virtual host
name: dan.mydomain.com
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Adding Host request
header
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.getCookies()
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.match(String, int, String, boolean, Cookie[])
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.match(String, int, String, boolean, Cookie
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
[DEBUG] httpclient.wire.header - >> "User-Agent: Mozilla/4.0 (compatible;
MSIE 6.0b; Windows 98)[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] httpclient.wire.header - >> "Host: dan.mydomain.com:7001[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.print(String)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.writeLine()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[])
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.write(byte[], int, int)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] httpclient.wire.header - >> "[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponse(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readStatusLine(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.readLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HeaderParser.parseHeaders(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readLine(InputStream, String)
[DEBUG] org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
[DEBUG] httpclient.wire.header - << "Date: Tue, 03 May 2005 00:27:11
GMT[\r][\n]"
[DEBUG] httpclient.wire.header - << "Server: WebLogic Server 8.1 SP2 Fri
Dec 5 15:01:51 PST 2003 316284[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Length: 46[\r][\n]"
[DEBUG] httpclient.wire.header - << "Content-Type: text/html[\r][\n]"
[DEBUG] httpclient.wire.header - << "Set-Cookie:
JSESSIONID=C2Ffu6TcZM72ck8hrINh9rn4eCNqeFo4BEEXsftY04HB1QcGrgR3!-1295899335;
path=/[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.processResponseHeaders(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.parse(String, port, path, boolean, String)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.parse(String, port, path, boolean, Header)
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(char[])
[DEBUG] org.apache.commons.httpclient.Cookie - enter Cookie(String, String,
String, String, Date, boolean)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.validate(String, int, String, boolean, Cookie)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
CookieSpecBase.validate(String, port, path, boolean, Cookie)
[DEBUG] org.apache.commons.httpclient.HttpState - enter
HttpState.addCookie(Cookie)
[DEBUG] org.apache.commons.httpclient.Cookie - enter Cookie.equals(Object)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.formatCookie(Cookie)
[DEBUG] org.apache.commons.httpclient.cookie.CookieSpec - enter
RFC2109Spec.formatCookieAsVer(Cookie)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Cookie accepted:
"$Version=0;
JSESSIONID=C2Ffu6TcZM72ck8hrINh9rn4eCNqeFo4BEEXsftY04HB1QcGrgR3!-1295899335;
$Path=/"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpState, HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponseBody(HttpConnection)
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.getResponseInputStream()
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - enter
getContentCharSet( Header contentheader )
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(String)
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.parseElements(char[])
[DEBUG] org.apache.commons.httpclient.HeaderElement - enter
HeaderElement.getParameterByName(String)
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Default charset
used: ISO-8859-1
[DEBUG] httpclient.wire.content - << "<html>[\r][\n]"
[DEBUG] httpclient.wire.content - << "<title>get cookie</title>[\r][\n]"
[DEBUG] httpclient.wire.content - << "[\r][\n]"
[DEBUG] httpclient.wire.content - << "</html>[\r][\n]"
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Resorting to
protocol version default close connection policy
[DEBUG] org.apache.commons.httpclient.HttpMethodBase - Should NOT close
connection, using HTTP/1.1
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.isResponseAvailable()
[DEBUG] org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.releaseConnection()
[DEBUG] org.apache.commons.httpclient.HttpConnection - Releasing connection
back to connection manager.
[INFO] com.myapp.test - test fails
===
===
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 02, 2005 2:57 PM
> To: [EMAIL PROTECTED]
> Cc: HttpClient Project
> Subject: RE: DNS vs. IP question
>
>
> On Mon, 2005-05-02 at 13:46 -0700, Dan Levine wrote:
> > Thank you for the responses. The two responses that talked
> about virtual
> > hosts were easy to try and sounded great, but dont seem to do
> what I want.
> > I want to be able to connect to a server via IP (without DNS lookup) and
> > set/get a cookie based on a DNS name. Does it sound like Virtual Host
> > header should be able to do this? It doesnt seem like it.
> When I set the
> > "Host" header (or the .setVirtualHost param) and go to a page
> that tries to
> > set a cookie to the domain of that DNS name, it doesnt work. Should it?
>
> Dan,
> Actually it _should_ work. Since it does not it is _likely_ to be a bug
> in HttpClient. At the same time there's also a chance of this being a
> server side problem. Please post a wire/context log of the HTTP session
> to this list and I'll take a look at it tomorrow
>
> http://jakarta.apache.org/commons/httpclient/3.0/logging.html
>
> > Roland, your approach sounds like it should work because that is exactly
> > what I am trying to do -- skip around a DNS lookup but still be
> able to have
> > the client "think" it is on a DNS address so it can set/check cookies
> > hardcoded to that DNS for domain. How do I "install" a custom
> > ProtocolSocketFactory? Where do ProtocolSocketFactory classes live in
> > relation to HttpClient and HttpMethod objects?
>
> As to the ProtocolSocketFactory you may find this guide useful.
>
> http://jakarta.apache.org/commons/httpclient/3.0/sslguide.html
>
> It deals primarily with the SSL customization. However the same
> technique can be used to customize plain socket connections.
>
> Hope this helps,
>
> Oleg
>
>
> >
> > Thanks!
> >
> > dan
> >
> > > -----Original Message-----
> > > From: Roland Weber [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, April 28, 2005 11:18 PM
> > > To: HttpClient Project
> > > Subject: Re: DNS vs. IP question
> > >
> > >
> > > Hello Dan,
> > >
> > > HTTP always ends up on the IP level, sooner or later.
> > > At one time, a connection to the target server has to
> > > be opened, and that means that the IP address of the
> > > server has to be known.
> > > I assume you want to run test cases for hostnames
> > > that are not registered in DNS, and you don't want
> > > to hack the hostnames into /etc/hosts on the machine.
> > > If that is the case, you can install a custom version of
> > > o.a.c.h.protocol.ProtocolSocketFactory. That is the
> > > place where hostname strings go in, and sockets
> > > come out. There, you can implement your own mapping
> > > from hostnames to IP addresses, without using DNS.
> > >
> > > hope that helps,
> > > Roland
> > >
> > >
> > >
> > >
> > > "Dan Levine" <[EMAIL PROTECTED]>
> > > 29.04.2005 00:05
> > > Please respond to
> > > "HttpClient Project"
> > >
> > >
> > > To
> > > <[email protected]>
> > > cc
> > >
> > > Subject
> > > DNS vs. IP question
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hello,
> > >
> > > First of all, thank you for HttpClient. I am working with
> HtmlUnit Web
> > > testing framework, and appreciate the underlying base this provides.
> > >
> > > For some tests I want to set up, I need to have the Web
> client call pages
> > > via IP but act as if it is using a DNS. (i.e. cookies etc
> behave as if
> > > were
> > > DNS, but the actual http calls fetch pages via IP.) According to an
> > > engineer I work with, this is common functionality for mock
> Web clients.
> > > If
> > > this functionality is exposed through HttpClient I'll work on
> > > incorporating
> > > that into HtmlUnit. Please advise...
> > >
> > > Thank you!
> > >
> > > Dan
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]