Nope didn't work new relevant piece of trace: Not in my proxy trace there seems to be one more cookie than I see in the trace: Cookie: BID=X1DE45D226BE57EF9DFCF03167215B4A8901B5D817388E18FAC3B90790F0B43DA2; bJobSeeker=True; RMID=432198953edf80d0; CB%5FSID=1aee5b36f209457aa530b0d72a1e8c8f%2D110026554%2Ds4%2D1; PU=0; CP=null
The RMID cookie. I don't see it all in the trace even being rejected... 2003/06/27 14:09:08:301 EDT [DEBUG] wire - ->> "POST /JobSeeker/Jobs/jobfindall.asp?ch=al HTTP/1.0[\r][\n]" 2003/06/27 14:09:08:301 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:301 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:301 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:301 EDT [TRACE] HttpMethod - -enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection) 2003/06/27 14:09:08:301 EDT [TRACE] ExpectContinueMethod - -enter ExpectContinueMethod.addRequestHeaders(HttpState, Http Connection) 2003/06/27 14:09:08:341 EDT [TRACE] HttpMethod - -enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection) 2003/06/27 14:09:08:341 EDT [TRACE] HttpMethod - -enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnect ion) 2003/06/27 14:09:08:341 EDT [TRACE] HttpMethod - -enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection) 2003/06/27 14:09:08:341 EDT [DEBUG] HttpMethod - -Adding Host request header 2003/06/27 14:09:08:341 EDT [TRACE] HttpMethod - -enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection) 2003/06/27 14:09:08:341 EDT [TRACE] HttpState - -enter HttpState.getCookies() 2003/06/27 14:09:08:341 EDT [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie[]) 2003/06/27 14:09:08:341 EDT [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie 2003/06/27 14:09:08:341 EDT [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie 2003/06/27 14:09:08:401 EDT [TRACE] Cookie - -enter Cookie.compare(Object, Object) 2003/06/27 14:09:08:401 EDT [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie 2003/06/27 14:09:08:401 EDT [TRACE] Cookie - -enter Cookie.compare(Object, Object) 2003/06/27 14:09:08:401 EDT [TRACE] Cookie - -enter Cookie.compare(Object, Object) 2003/06/27 14:09:08:401 EDT [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie 2003/06/27 14:09:08:401 EDT [TRACE] Cookie - -enter Cookie.compare(Object, Object) 2003/06/27 14:09:08:401 EDT [TRACE] Cookie - -enter Cookie.compare(Object, Object) 2003/06/27 14:09:08:401 EDT [TRACE] Cookie - -enter Cookie.compare(Object, Object) 2003/06/27 14:09:08:401 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookieHeader(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookie(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookieHeader(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookie(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookieHeader(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookie(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookieHeader(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] CookieSpec - -enter CookieSpecBase.formatCookie(Cookie) 2003/06/27 14:09:08:461 EDT [TRACE] HttpMethod - -enter HttpMethodBase.addAuthorizationRequestHeader(HttpState, HttpConn ection) 2003/06/27 14:09:08:461 EDT [TRACE] HttpMethod - -enter HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState, Htt pConnection) 2003/06/27 14:09:08:521 EDT [TRACE] HttpMethod - -enter HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnectio n) 2003/06/27 14:09:08:521 EDT [TRACE] EntityEnclosingMethod - -enter HttpMethodBase.addContentLengthRequestHeader(HttpStat e, HttpConnection) 2003/06/27 14:09:08:521 EDT [TRACE] EntityEnclosingMethod - -enter EntityEnclosingMethod.getRequestContentLength() 2003/06/27 14:09:08:521 EDT [TRACE] PostMethod - -enter PostMethod.hasRequestContent() 2003/06/27 14:09:08:521 EDT [TRACE] PostMethod - -enter PostMethod.renerateRequestBody() 2003/06/27 14:09:08:521 EDT [TRACE] PostMethod - -enter PostMethod.getParameters() 2003/06/27 14:09:08:521 EDT [TRACE] HttpMethod - -enter getContentCharSet( Header contentheader ) 2003/06/27 14:09:08:521 EDT [DEBUG] HttpMethod - -Default charset used: ISO-8859-1 2003/06/27 14:09:08:602 EDT [TRACE] HttpMethod - -HttpMethodBase.addRequestHeader(Header) 2003/06/27 14:09:08:602 EDT [DEBUG] wire - ->> "Referer: http://www.careerbuilder.com/JobSeeker/Jobs/JobQuery.asp?ch=al[ \r][\n]" 2003/06/27 14:09:08:612 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:612 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:612 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:612 EDT [DEBUG] wire - ->> "User-Agent: Jakarta Commons-HttpClient/2.0beta1[\r][\n]" 2003/06/27 14:09:08:612 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:612 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:672 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:672 EDT [DEBUG] wire - ->> "Host: www.careerbuilder.com[\r][\n]" 2003/06/27 14:09:08:672 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:672 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:672 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:672 EDT [DEBUG] wire - ->> "Cookie: PU=0[\r][\n]" 2003/06/27 14:09:08:672 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:672 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:672 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:742 EDT [DEBUG] wire - ->> "Cookie: CB%5FSID=1a4a0a13fbed41a7b8d5f3e5f7e0fa63%2D110038107%2Drd%2D1[\ r][\n]" 2003/06/27 14:09:08:742 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:742 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:742 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:742 EDT [DEBUG] wire - ->> "Cookie: BID=X1AF7F150CF82DEEBAB1ECDD58B09A41B275D6BD5501510E4946BD091BD3 2FB4A5[\r][\n]" 2003/06/27 14:09:08:742 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:742 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:742 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:742 EDT [DEBUG] wire - ->> "Cookie: bJobSeeker=True[\r][\n]" 2003/06/27 14:09:08:802 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:802 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:802 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:802 EDT [DEBUG] wire - ->> "Content-Length: 155[\r][\n]" 2003/06/27 14:09:08:802 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:802 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:802 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:802 EDT [DEBUG] wire - ->> "Content-Type: application/x-www-form-urlencoded[\r][\n]" 2003/06/27 14:09:08:802 EDT [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/06/27 14:09:08:862 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:862 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:862 EDT [TRACE] HttpConnection - -enter HttpConnection.writeLine() 2003/06/27 14:09:08:862 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/06/27 14:09:08:862 EDT [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/06/27 14:09:08:862 EDT [TRACE] HttpConnection - -enter HttpConnection.flushRequestOutputStream() 2003/06/27 14:09:08:862 EDT [DEBUG] wire - ->> "[\r][\n]" 2003/06/27 14:09:08:862 EDT [TRACE] EntityEnclosingMethod - -enter EntityEnclosingMethod.writeRequestBody(HttpState, Htt pConnection) 2003/06/27 14:09:08:862 EDT [TRACE] PostMethod - -enter PostMethod.hasRequestContent() 2003/06/27 14:09:08:922 EDT [TRACE] EntityEnclosingMethod - -enter EntityEnclosingMethod.getRequestContentLength() 2003/06/27 14:09:08:922 EDT [TRACE] PostMethod - -enter PostMethod.hasRequestContent() 2003/06/27 14:09:08:922 EDT [DEBUG] EntityEnclosingMethod - -Using buffered request body 2003/06/27 14:09:08:922 EDT [TRACE] HttpConnection - -enter HttpConnection.getRequestOutputStream() 2003/06/27 14:09:08:922 EDT [DEBUG] wire - ->> "st=a&Words=java&Use=All&Town=&Freshness=&EdLevel=DR3&EdExec=YES&EmpType= JTFT&EmpType=JTCT&minsalary=0&maxsalary=gt120&vt=title&submit1=Search&sname= &jrdid=" 2003/06/27 14:09:08:922 EDT [DEBUG] EntityEnclosingMethod - -Request body sent 2003/06/27 14:09:08:922 EDT [TRACE] HttpConnection - -enter HttpConnection.flushRequestOutputStream() 2003/06/27 14:09:08:922 EDT [TRACE] HttpMethod - -enter HttpMethodBase.readResponse(HttpState, HttpConnection) 2003/06/27 14:09:08:922 EDT [TRACE] HttpMethod - -enter HttpMethodBase.readStatusLine(HttpState, HttpConnection) 2003/06/27 14:09:08:992 EDT [TRACE] HttpConnection - -enter HttpConnection.readLine() 2003/06/27 14:09:08:992 EDT [TRACE] HttpParser - -enter HttpParser.readLine() 2003/06/27 14:09:08:992 EDT [TRACE] HttpParser - -enter HttpParser.readRawLine() 2003/06/27 14:09:09:052 EDT [DEBUG] wire - -<< "HTTP/1.1 499 Data Error NoSessionId[\r][\n]" 2003/06/27 14:09:09:052 EDT [TRACE] HttpMethod - -enter HttpMethodBase.readResponseHeaders(HttpState,HttpConnection) -----Original Message----- From: Ross Rankin [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, June 27, 2003 2:06 PM To: 'Commons HttpClient Project' Subject: RE: Cookie Issues So a post.setRequestHeader should do the trick? I'll give it a shot. Ross -----Original Message----- From: Michael Becke [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 1:51 PM To: Commons HttpClient Project Subject: Re: Cookie Issues The cookies appear to be working correctly. I think the problem is that the POST cgi requires a referer header. Generally this is the URL of the page containing the HTML form doing the post. Take a look at http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z14 for more on the referer header. Mike Ross Rankin wrote: > Here's the trace and what my proxy says on a browser run post for > comparison. I looked through the trace and I'm not sure what the issue is, > I thought I might find it, but I didn't. Thanks for any help you can > provide. > > Ross > > -----Original Message----- > From: Michael Becke [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2003 12:01 PM > To: Commons HttpClient Project > Subject: Re: Cookie Issues > > Ross, > > Cookies are automatically stored in an HttpClient's instance of > HttpState. If you use the same instance of HttpClient to execute the > GET on the initial page and the POST all should be automatically handled. > > Please post a wire log showing the GET and POST if the cookie handling > continues to not work (see > http://jakarta.apache.org/commons/httpclient/logging.html). > > Mike > > [EMAIL PROTECTED] wrote: > >>I guessing that I am not doing something right. I have a site which has a >>session id that it sends as a cookie. I get the cookie when I get the >>initial page. I then have to send a post and send that cookie back. >>However I get back a error message from the server which says no session > > id. > >>Now I did a trace and it just send back "HTTP/1.1 499 Data Error >>NoSessionId" Not very helpful. >> >> >> >>Is there something that I need to do other than >>"client.getState().getCookies" when I get the first page to make sure that >>the cookies are sent back with the post data? >> >> >> >>Thanks, >> >> >> >>Ross Rankin >> >> >> >> >> >> > > > > --------------------------------------------------------------------- > 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]