hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Wijono" <hwij...@gmail.com>
Subject Cookie and Post Issue..
Date Wed, 21 Jun 2006 03:48:07 GMT
Hello..

How can i login from one page to another? The first page is giving a login
error, not accepting cookie. The second code allows me to login to the site.
But the browser shows a local path to the servlet instead of redirecting to
the urlC. I think it allows me to login to the second site, but not the
first.

Below is snipet of my code.. your help/direction is greatly appreciated.
Thanks.

String urlA = "https://abc.com/user/dologin.php";
String urlB = "https://abc.com/index.php";
String urlC = "https://abc.com/inventory/index.php";

                // Set cookie parameter to a single header
                httpClient.getParams().setBooleanParameter(
HttpMethodParams.SINGLE_COOKIE_HEADER, true);

                //PostMethod method = new PostMethod(urlA);
                GetMethod method = new GetMethod(urlA);
                NameValuePair[] putData = {
                    new NameValuePair("username", username),
                    new NameValuePair("password", password),
                    new NameValuePair("section", "inventory"),
                    new NameValuePair("Content-Length", "1500"),
                    new NameValuePair("Referer", "
https://abc.com/user/dologin.php"),
                    new NameValuePair("method", "post"),
                    new NameValuePair("swpcookie", "ABC"),
                    new NameValuePair("Content-Type",
"application/x-www-form-urlencoded; charset=UTF8"),
                    new NameValuePair("Content-Style-Type", "text/css"),
                    new NameValuePair("User-Agent", "Mozilla/5.0 (Windows;
U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4" ),
                    new NameValuePair("Cache-Control", "private"),
                    new NameValuePair("pragma", "no-cache")};

                    // POST
                    //method.setRequestBody(putData);
                    // GET
                    method.setQueryString(putData);

                    //write out the request headers
                    System.out.println("*** Request ***");
                    System.out.println("Request Follow Redirects: " +
method.getFollowRedirects());
                    System.out.println("Request URI: " + method.getURI());
                    System.out.println("Request Path: " + method.getPath());
                    System.out.println("Request Query: " +
method.getQueryString());
                    Header[] requestHeaders1 = method.getRequestHeaders();
                    for (int i=0; i < requestHeaders1.length; i++){
                        System.out.print("Request Headers: " +
requestHeaders1[i]);
                    }

                    //write out the response headers
                    System.out.println("*** Response ***");
                    System.out.println("Status Line: " +
method.getStatusLine());
                    Header[] responseHeaders1 = method.getResponseHeaders();
                    for (int i=0; i<responseHeaders1.length; i++){
                        System.out.print(responseHeaders1[i]);
                    }

                // Execute the method.
                statusCode = httpClient.executeMethod(method);
                if (statusCode != HttpStatus.SC_OK) {
                    System.err.println("Method failed: " +
method.getStatusLine());
                }

            is = new InputStreamReader(method.getResponseBodyAsStream());
            in = new BufferedReader(is);

            for ( String s; ( s = in.readLine() ) != null; )
                System.out.println( " OUTPUT A " + s );

*****************************************************************************
LOG
*****************************************************************************
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.protocol.single-cookie-header = true
DEBUG [org.apache.commons.httpclient.methods.GetMethod] enter
GetMethod(String)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.setQueryString(NameValuePair[])
*** Request ***
Request Follow Redirects: true
Request URI:
https://abc.com/user/dologin.php?username=hwijono&password=Password1&section=inventory&Content-Length=1500&Referer=https%3A%2F%2Fabc.com%2Fuser%2Fdologin.php&method=post&swpcookie=ABC&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3DUTF8&Content-Style-Type=text%2Fcss&User-Agent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.4%29+Gecko%2F20060508+Firefox%2F1.5.0.4&Cache-Control=private&pragma=no-cache
Request Path: /v240/user/dologin.php
Request Query:
username=hwijono&password=Password1&section=inventory&Content-Length=1500&Referer=https%3A%2F%2Fabc.com%2Fuser%2Fdologin.php&method=post&swpcookie=ABC&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3DUTF8&Content-Style-Type=text%2Fcss&User-Agent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.4%29+Gecko%2F20060508+Firefox%2F1.5.0.4&Cache-Control=private&pragma=no-cache
*** Response ***
Status Line: null
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
abc.com:443
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
/user/dologin.php?username=hwijono&password=Password1&section=inventory&Content-Length=1500&Referer=https%3A%2F%2Fabc.com%2Fuser%2Fdologin.php&method=post&swpcookie=ABC&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3DUTF8&Content-Style-Type=text%2Fcss&User-Agent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.4%29+Gecko%2F20060508+Firefox%2F1.5.0.4&Cache-Control=private&pragma=no-cache
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] 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.formatCookieHeader(Cookie[])
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
DEBUG [httpclient.wire.header] >> "User-Agent: Jakarta
Commons-HttpClient/3.0.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 [httpclient.wire.header] >> "Host: abc.com[\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;
swpcookie=hwijono_8e1289f6f68b940adaac979eecbcc025; $Path=/[\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 [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 [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: Wed, 21 Jun 2006 03:24:32
GMT[\r][\n]"
DEBUG [httpclient.wire.header] << "Server: Apache/2.0.52 (Red Hat)[\r][\n]"
DEBUG [httpclient.wire.header] << "X-Powered-By: PHP/4.4.0[\r][\n]"
DEBUG [httpclient.wire.header] << "Set-Cookie:
swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe; path=/[\r][\n]"
DEBUG [httpclient.wire.header] << "Set-Cookie: pwdexp=deleted; expires=Tue,
21 Jun 2005 03:24:31 GMT; path=/[\r][\n]"
DEBUG [httpclient.wire.header] << "Content-Length: 780[\r][\n]"
DEBUG [httpclient.wire.header] << "Connection: close[\r][\n]"
DEBUG [httpclient.wire.header] << "Content-Type: text/html;
charset=utf-8[\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.CookieSpec] enter
RFC2109Spec.formatCookie(Cookie)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Cookie accepted:
"$Version=0; swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe; $Path=/"
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.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.CookieSpec] enter
RFC2109Spec.formatCookie(Cookie)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Cookie accepted:
"$Version=0; pwdexp=deleted; $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
HttpMethodBase.canResponseHaveBody(int)
 OUTPUT A <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 OUTPUT A <!--"http://www.w3.org/TR/html4/strict.dtd"-->
 OUTPUT A <html>
 OUTPUT A <head>
 OUTPUT A <title>ABC</title>
 OUTPUT A <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
 OUTPUT A <link rel=STYLESHEET type="text/css" href="
https://abc.com/lib/en.css" title="">
 OUTPUT A <script language="javascript">function submitform() {
document.frmdologin.submit(); }</script></head>
 OUTPUT A <body onload="submitform();"><center><b>Logging in...please
wait</b></center>
 OUTPUT A    <form name="frmdologin" method="post" action="
https://abc.com/inventory/index.php">
 OUTPUT A       <input type="hidden" name="message" value="Your browser is
not accepting the login cookie.  Please enable cookies in your browser.">
 OUTPUT A    </form>
 OUTPUT A </body>
 OUTPUT A </html>
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Should close connection
in response to directive: close
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.close()
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.closeSockedAndStreams()
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.methods.GetMethod] enter
GetMethod(String)
 COOKIE
DEBUG [org.apache.commons.httpclient.HttpState] enter HttpState.getCookies()
DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
CookieSpecBase.formatCookie(Cookie)
 - swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe
DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
CookieSpecBase.formatCookie(Cookie)
DEBUG [org.apache.commons.httpclient.HttpState] enter HttpState.addCookies
(Cookie[])
DEBUG [org.apache.commons.httpclient.HttpState] enter HttpState.addCookie
(Cookie)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.setQueryString(NameValuePair[])
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.method.retry-handler =
org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@159ea8e
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
abc.com:443
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
/user/dologin.php?username=hwijono&password=Password1&Content-Length=1500&Referer=https%3A%2F%2Fabc.com%2Fuser%2Fdologin.php&method=post&swpcookie=swpcookie%3Dhwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3DUTF8&Content-Style-Type=text%2Fcss&User-Agent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.4%29+Gecko%2F20060508+Firefox%2F1.5.0.4&Cache-Control=private&pragma=no-cache
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] 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.formatCookieHeader(Cookie[])
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
DEBUG [httpclient.wire.header] >> "User-Agent: Jakarta
Commons-HttpClient/3.0.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 [httpclient.wire.header] >> "Host: abc.com[\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;
swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe; $Path=/[\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 [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 [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: Wed, 21 Jun 2006 03:24:32
GMT[\r][\n]"
DEBUG [httpclient.wire.header] << "Server: Apache/2.0.52 (Red Hat)[\r][\n]"
DEBUG [httpclient.wire.header] << "X-Powered-By: PHP/4.4.0[\r][\n]"
DEBUG [httpclient.wire.header] << "Set-Cookie:
swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe; path=/[\r][\n]"
DEBUG [httpclient.wire.header] << "Set-Cookie: pwdexp=deleted; expires=Tue,
21 Jun 2005 03:24:31 GMT; path=/[\r][\n]"
DEBUG [httpclient.wire.header] << "Content-Length: 771[\r][\n]"
DEBUG [httpclient.wire.header] << "Connection: close[\r][\n]"
DEBUG [httpclient.wire.header] << "Content-Type: text/html;
charset=utf-8[\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.CookieSpec] enter
RFC2109Spec.formatCookie(Cookie)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Cookie accepted:
"$Version=0; swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe; $Path=/"
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.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.CookieSpec] enter
RFC2109Spec.formatCookie(Cookie)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Cookie accepted:
"$Version=0; pwdexp=deleted; $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
HttpMethodBase.canResponseHaveBody(int)
*** Request ***
Request Follow Redirects: true
Request URI:
https://abc.com/user/dologin.php?username=hwijono&password=Password1&Content-Length=1500&Referer=https%3A%2F%2Fabc.com%2Fuser%2Fdologin.php&method=post&swpcookie=swpcookie%3Dhwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3DUTF8&Content-Style-Type=text%2Fcss&User-Agent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.4%29+Gecko%2F20060508+Firefox%2F1.5.0.4&Cache-Control=private&pragma=no-cache
Request Path: /user/dologin.php
Request Query:
username=hwijono&password=Password1&Content-Length=1500&Referer=https%3A%2F%2Fabc.com%2Fuser%2Fdologin.php&method=post&swpcookie=swpcookie%3Dhwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3DUTF8&Content-Style-Type=text%2Fcss&User-Agent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.4%29+Gecko%2F20060508+Firefox%2F1.5.0.4&Cache-Control=private&pragma=no-cache
Request Headers: User-Agent: Jakarta Commons-HttpClient/3.0.1
Request Headers: Host: abc.sentienthealth.com
Request Headers: Cookie: $Version=0;
swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe; $Path=/
*** Response ***
Status Line: HTTP/1.1 200 OK
Date: Wed, 21 Jun 2006 03:24:32 GMT
Server: Apache/2.0.52 (Red Hat)
X-Powered-By: PHP/4.4.0
Set-Cookie: swpcookie=hwijono_8a61f22a2cfad0fa99cfa7fe0f1f26fe; path=/
Set-Cookie: pwdexp=deleted; expires=Tue, 21 Jun 2005 03:24:31 GMT; path=/
Content-Length: 771
Connection: close
Content-Type: text/html; charset=utf-8
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Should close connection
in response to directive: close
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.close()
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.closeSockedAndStreams()
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.releaseConnection()
DEBUG [org.apache.commons.httpclient.HttpConnection] Releasing connection
back to connection manager.



-- 
Henry Wijono <:]]><

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message