Re: Redirect Issue

2003-05-28 Thread Adrian Sutton
Use the logging features to see exactly what was sent back (and make 
sure you're cookies are in compatibility mode).  You can find more info 
on logging at http://jakarta.apache.org/commons/httpclient/logging.html

Cookies are generally Oleg's realm but I'd pretty much guarantee he'll 
need a wire trace log to track down the problem. :)

Regards,

Adrian Sutton.

On Wednesday, May 28, 2003, at 03:44  PM, Sunil Kumar K wrote:

Thanks Oleg,

I tried that, now I'm getting this error..

WARNING: Invalid cookie header: DOMS=; PATH=. Missing value for path
attribute
What should I do...??

regards
sunil
- Original Message -
From: Kalnichevski, Oleg [EMAIL PROTECTED]
To: Commons HttpClient Project 
[EMAIL PROTECTED];
Sunil Kumar Kolar [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 8:52 PM
Subject: RE: Redirect Issue

Sunil,

At the moment HttpClient does not support automatic POST redirects. 
All you have
to do it is to manually issue GET request to the location specified in 
the
redirect response. Have a look at the following resource for more 
details

http://jakarta.apache.org/commons/httpclient/redirects.html

Oleg

-Original Message-
From: Sunil Kumar K [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 16:17
To: Commons HttpClient Project
Subject: Redirect Issue
Guys,

Please help me out!.

I'm trying to use HttpClient to send HTTP POST Messages..
I'm getting this error...
Does it mean that I cannot send message to URL which does not support
redirecting..
or I've to set redirect to true... somewhere

May 27, 2003 7:40:04 PM org.apache.commons.httpclient.HttpMethodBase
processRedirectResponse
INFO: Redirect requested but followRedirects is disabled
*** Response ***
Status Line: HTTP/1.0 302 Found
*** Response Body ***

cheers!
Sunil

Assumption is the mother of all screw-ups



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Redirect Issue

2003-05-28 Thread Sunil Kumar K
Thanks Adrian...
Will do that...

- Original Message -
From: Adrian Sutton [EMAIL PROTECTED]
To: Commons HttpClient Project [EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 11:33 AM
Subject: Re: Redirect Issue


| Use the logging features to see exactly what was sent back (and make
| sure you're cookies are in compatibility mode).  You can find more info
| on logging at http://jakarta.apache.org/commons/httpclient/logging.html
|
| Cookies are generally Oleg's realm but I'd pretty much guarantee he'll
| need a wire trace log to track down the problem. :)
|
| Regards,
|
| Adrian Sutton.
|
| On Wednesday, May 28, 2003, at 03:44  PM, Sunil Kumar K wrote:
|
|  Thanks Oleg,
| 
|  I tried that, now I'm getting this error..
| 
|  WARNING: Invalid cookie header: DOMS=; PATH=. Missing value for path
|  attribute
| 
|  What should I do...??
| 
|  regards
|  sunil
| 
|  - Original Message -
|  From: Kalnichevski, Oleg [EMAIL PROTECTED]
|  To: Commons HttpClient Project
|  [EMAIL PROTECTED];
|  Sunil Kumar Kolar [EMAIL PROTECTED]
|  Sent: Tuesday, May 27, 2003 8:52 PM
|  Subject: RE: Redirect Issue
| 
| 
|  Sunil,
| 
|  At the moment HttpClient does not support automatic POST redirects.
|  All you have
|  to do it is to manually issue GET request to the location specified in
|  the
|  redirect response. Have a look at the following resource for more
|  details
| 
|  http://jakarta.apache.org/commons/httpclient/redirects.html
| 
|  Oleg
| 
|  -Original Message-
|  From: Sunil Kumar K [mailto:[EMAIL PROTECTED]
|  Sent: Tuesday, May 27, 2003 16:17
|  To: Commons HttpClient Project
|  Subject: Redirect Issue
| 
| 
|  Guys,
| 
|  Please help me out!.
| 
|  I'm trying to use HttpClient to send HTTP POST Messages..
|  I'm getting this error...
|  Does it mean that I cannot send message to URL which does not support
|  redirecting..
|  or I've to set redirect to true... somewhere
|  
|  May 27, 2003 7:40:04 PM org.apache.commons.httpclient.HttpMethodBase
|  processRedirectResponse
|  INFO: Redirect requested but followRedirects is disabled
|  *** Response ***
|  Status Line: HTTP/1.0 302 Found
|  *** Response Body ***
|  
| 
|  cheers!
|  Sunil
|  
|  Assumption is the mother of all screw-ups
|  
|
|
| -
| 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]



Re: Redirect Issue

2003-05-28 Thread Sunil Kumar K
Here is the LOG:

Test1- start
before
Came here in RUN
2003/05/28 11:46:21:663 EDT [TRACE] GetMethod - -enter GetMethod(String)
2003/05/28 11:46:21:668 EDT [TRACE] PostMethod - -enter
PostMethod.addParameters(NameValuePair[])
2003/05/28 11:46:21:670 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(NameValuePair)
2003/05/28 11:46:21:673 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(String, String)
2003/05/28 11:46:21:676 EDT [TRACE] PostMethod - -enter
PostMethod.getParameters()
2003/05/28 11:46:21:677 EDT [TRACE] PostMethod - -enter
PostMethod.setRequestBody(NameValuePair[])
2003/05/28 11:46:21:678 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:679 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:679 EDT [TRACE] PostMethod - -enter
PostMethod.generateRequestBody(NameValuePair[])
2003/05/28 11:46:21:693 EDT [TRACE] EntityEnclosingMethod - -enter
EntityEnclosingMethod.setRequestBody(String)
2003/05/28 11:46:21:694 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:694 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:712 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(NameValuePair)
2003/05/28 11:46:21:713 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(String, String)
2003/05/28 11:46:21:713 EDT [TRACE] PostMethod - -enter
PostMethod.getParameters()
2003/05/28 11:46:21:713 EDT [TRACE] PostMethod - -enter
PostMethod.setRequestBody(NameValuePair[])
2003/05/28 11:46:21:714 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:714 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:716 EDT [TRACE] PostMethod - -enter
PostMethod.generateRequestBody(NameValuePair[])
2003/05/28 11:46:21:717 EDT [TRACE] EntityEnclosingMethod - -enter
EntityEnclosingMethod.setRequestBody(String)
2003/05/28 11:46:21:717 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:717 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:718 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(NameValuePair)
2003/05/28 11:46:21:718 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(String, String)
2003/05/28 11:46:21:719 EDT [TRACE] PostMethod - -enter
PostMethod.getParameters()
2003/05/28 11:46:21:724 EDT [TRACE] PostMethod - -enter
PostMethod.setRequestBody(NameValuePair[])
2003/05/28 11:46:21:724 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:725 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:725 EDT [TRACE] PostMethod - -enter
PostMethod.generateRequestBody(NameValuePair[])
2003/05/28 11:46:21:731 EDT [TRACE] EntityEnclosingMethod - -enter
EntityEnclosingMethod.setRequestBody(String)
2003/05/28 11:46:21:732 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:732 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:733 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(NameValuePair)
2003/05/28 11:46:21:733 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(String, String)
2003/05/28 11:46:21:733 EDT [TRACE] PostMethod - -enter
PostMethod.getParameters()
2003/05/28 11:46:21:734 EDT [TRACE] PostMethod - -enter
PostMethod.setRequestBody(NameValuePair[])
2003/05/28 11:46:21:734 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:734 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:735 EDT [TRACE] PostMethod - -enter
PostMethod.generateRequestBody(NameValuePair[])
2003/05/28 11:46:21:735 EDT [TRACE] EntityEnclosingMethod - -enter
EntityEnclosingMethod.setRequestBody(String)
2003/05/28 11:46:21:736 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:736 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:736 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(NameValuePair)
2003/05/28 11:46:21:737 EDT [TRACE] PostMethod - -enter
PostMethod.addParameter(String, String)
2003/05/28 11:46:21:737 EDT [TRACE] PostMethod - -enter
PostMethod.getParameters()
2003/05/28 11:46:21:737 EDT [TRACE] PostMethod - -enter
PostMethod.setRequestBody(NameValuePair[])
2003/05/28 11:46:21:738 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:738 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 11:46:21:738 EDT [TRACE] PostMethod - -enter
PostMethod.generateRequestBody(NameValuePair[])
2003/05/28 11:46:21:739 EDT [TRACE] EntityEnclosingMethod - -enter
EntityEnclosingMethod.setRequestBody(String)
2003/05/28 11:46:21:740 EDT [TRACE] HttpMethod - -enter getContentCharSet(
Header contentheader )
2003/05/28 11:46:21:740 EDT [DEBUG] HttpMethod - -Default charset used:
ISO-8859-1
2003/05/28 

DO NOT REPLY [Bug 20198] - HttpClient drops connection to the proxy when an invalid 'connection: close' directive is encountered in 'connection established' response

2003-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20198.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20198

HttpClient drops connection to the proxy when an invalid 'connection: close' directive 
is encountered in 'connection established' response





--- Additional Comments From [EMAIL PROTECTED]  2003-05-28 06:44 ---
Bin,

The only way to fix the problem in your production environment will be to
upgrade to beta-1. This should be an easy upgrade because your version (0308) is
a post alpha-3 version. So the differences will be small (the diff is huge
though) on the API level. You should at least give it a try.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect Issue

2003-05-28 Thread Ortwin Glück
Sunil,

a wirelog would be a lot more interesting.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Httpclient under weblogic 7.0

2003-05-28 Thread Ortwin Glück
Adrian Sutton wrote:
I'd also point you to the HTTPS guide but Oleg hasn't written it yet 
grin.


There still is the (short) one httpclient/docs/USING_HTTPS.txt
Browse it online here:
http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/docs/USING_HTTPS.txt?rev=1.4content-type=text/vnd.viewcvs-markup
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Redirect Issue

2003-05-28 Thread Adrian Sutton
Hi again Sunil,
I'm doing too many things at once here so I could be wrong, but would
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20240 be the same 
problem you're having?

If so, you should be able to upgrade to the latest nightly build and 
the problem would be fixed.  I can't be sure if the fix made it into 
beta 1 or not - it's definitely worth a look anyway.

Otherwise I promise to shutup and let Oleg impart his wisdom. :)

Adrian.

On Wednesday, May 28, 2003, at 04:33  PM, Sunil Kumar K wrote:

2003/05/28 11:46:33:901 EDT [TRACE] HttpParser - -enter
HttpConnection.readRawLine()
2003/05/28 11:46:33:902 EDT [DEBUG] wire - - Set-Cookie: DOMS=; 
PATH=
 [\r\n]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Redirect Issue

2003-05-28 Thread Kalnichevski, Oleg
Sunil,

'Set-Cookie: DOMS=; PATH=' cookie is rejected as it violates the RFC2109 specification.

Here's what you should do to work the problem around:

1) Upgrade to the latest nightly build (commons-httpclient-20030527.tar.gz)

http://cvs.apache.org/builds/jakarta-commons/nightly/commons-httpclient/ 

2) Use compatibility cookie policy. See examples below

http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/CookieDemoApp.java?rev=HEADcontent-type=text/vnd.viewcvs-markup

That should help

Cheers

Oleg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 20288] New: - httpMethod.releaseConnection does not terminate requests

2003-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20288.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20288

httpMethod.releaseConnection does not terminate requests

   Summary: httpMethod.releaseConnection does not terminate requests
   Product: Commons
   Version: 2.0 Alpha 3
  Platform: All
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: HttpClient
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This is the problem : I use the httpclient to fire many requests. At some point 
of time, the server has queued up requests. So certain requests are waiting for 
response. Now when I call httpMethod.releaseConnection, the request should stop 
waiting for the response and the connection should be closed. However, this 
does not happen. The request is only given up after it has timed out.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Httpclient under weblogic 7.0

2003-05-28 Thread Kalnichevski, Oleg
Om,

I strongly recommend to upgrade to beta-1 release (currently available through CVS 
only) or the latest nightly build. As far as I can see from the trace log you are 
still running an old version (most probably 2.0a3)

I'll be working on an SSL guide this weekend. So, stay tuned

Oleg

-Original Message-
From: Ortwin Glück [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 08:49
To: Commons HttpClient Project
Subject: Re: Httpclient under weblogic 7.0


Adrian Sutton wrote:
 I'd also point you to the HTTPS guide but Oleg hasn't written it yet 
 grin.


There still is the (short) one httpclient/docs/USING_HTTPS.txt
Browse it online here:
http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/docs/USING_HTTPS.txt?rev=1.4content-type=text/vnd.viewcvs-markup


-
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]



DO NOT REPLY [Bug 20288] - httpMethod.abort needed

2003-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20288.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20288

httpMethod.abort needed

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Major   |Enhancement
Summary|httpMethod.releaseConnection|httpMethod.abort needed
   |does not terminate requests |
   Target Milestone|--- |2.1 Final



--- Additional Comments From [EMAIL PROTECTED]  2003-05-28 08:12 ---
releaseConnection is meant to return a connection to the connection pool.
However it does not close it because the connection should be reused if possible.

What you want is a means to abort a request. This can be accomplished by
explicitly closing the physical connection and not returning it to the pool. We
should provide an 'abort' method that does that. I am not sure how this
integrates with the current connection manager architecture.

This is a feature request and not a bug. As we are in beta now, we can not
implement this until we have branched 2.0 out. So targetting for 2.1.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect Issue

2003-05-28 Thread Sunil Kumar K
Hi,

I think I should explain you the problem at hand clearly.

Users come to our site A and provide some information on page N.
Our application should process the information and depending on the user
should send POST data to other URLs. Those URLs are supposed to
receive dat and display their page back. So users are being redirected to
diff site page. I'm using httpclient to send POST message. Should I
need to get the response back and display it OR sending POST message
is enough and browser will get new page from site B.

Thanks in advance!

regards
Sunil

- Original Message -
From: Kalnichevski, Oleg [EMAIL PROTECTED]
To: Commons HttpClient Project [EMAIL PROTECTED];
Sunil Kumar Kolar [EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 12:52 PM
Subject: RE: Redirect Issue


Sunil,

'Set-Cookie: DOMS=; PATH=' cookie is rejected as it violates the RFC2109
specification.

Here's what you should do to work the problem around:

1) Upgrade to the latest nightly build (commons-httpclient-20030527.tar.gz)

http://cvs.apache.org/builds/jakarta-commons/nightly/commons-httpclient/

2) Use compatibility cookie policy. See examples below

http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/CookieDemo
App.java?rev=HEADcontent-type=text/vnd.viewcvs-markup

That should help

Cheers

Oleg

-
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]



Re: Redirect Issue

2003-05-28 Thread Ortwin Glück
Sunil Kumar K wrote:
 Should I
need to get the response back and display it OR sending POST message
is enough and browser will get new page from site B.
Sunil,

The user's browser only gets what you write to the ServletOutputStream 
of your servlet. This is not an issue with HttpClient. Please refer to 
text books on Servlet Programming.

Odi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Redirect Issue

2003-05-28 Thread Sunil Kumar K
Ya I relealised that 
But I also had some HTTPClient issues.
Oleg and Adrian helped to solve those issues...
Thanks guys...


- Original Message -
From: Ortwin Glück [EMAIL PROTECTED]
To: Commons HttpClient Project [EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 3:07 PM
Subject: Re: Redirect Issue


| Sunil Kumar K wrote:
|   Should I
|  need to get the response back and display it OR sending POST message
|  is enough and browser will get new page from site B.
|
| Sunil,
|
| The user's browser only gets what you write to the ServletOutputStream
| of your servlet. This is not an issue with HttpClient. Please refer to
| text books on Servlet Programming.
|
| Odi
|
|
| -
| 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]



DO NOT REPLY [Bug 10809] - Developer documentation

2003-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10809.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10809

Developer documentation





--- Additional Comments From [EMAIL PROTECTED]  2003-05-28 10:56 ---
Created an attachment (id=6530)
Corrections to troubleshooting.xml and adds cookie guide to the menu.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]