Re: proxy authentication

2004-05-09 Thread Michael Becke
Hi lili,

It sounds like an internal problem with the proxy server, but it's 
difficult to tell.  If you post a wire log 
 we should 
be able to get a better idea of what's happening.

Mike

On May 9, 2004, at 7:30 PM, Lili Liu wrote:

My proxy authentication code (basic host) works well unless I ran it 
on a
special IP address.
The internet traffic on this special IP has to go through a proxy 
server
(The same proxy I used in the code).
In another word, if I access internet using a browser, I have to 
specify a
valid proxy server. Otherwise, there is no internet access.

My proxy authentication code is as follows:

client.getState().setAuthenticationPreemptive(true);
client.getHostConfiguration().setProxy(proxyhost,
80);
client.getState().setProxyCredentials(null,
proxyhost,
 new
UsernamePasswordCredentials(proxyusername, proxypwd));
And I got the follwing error msg:

May 9, 2004 4:13:01 PM org.apache.commons.httpclient.HttpMethodBase
readResponseBody
WARNING: Response content length is not known
status is .504
Proxy Error ( Connection timed out )
Via: 1.1 PROXY02
Pragma: no-cache

Cache-Control: no-cache

Content-Type: text/html

If I ran the program not from the special IP address, I got following
success msg:
May 9, 2004 4:07:01 PM org.apache.commons.httpclient.HttpMethodBase
processAuthenticationResponse
Via: 1.1 PROXY02
Proxy-Connection: Keep-Alive

Content-Length: 4431

Content-Type: text/html

Server: Microsoft-IIS/5.1

Date: Sun, 09 May 2004 23:07:01 GMT

WWW-Authenticate: Basic realm="INXIGHT"

---Basic realm="INXIGHT"
Trying basic authetication
OK
200
Any help is appreciated!
lili
-
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]


proxy authentication

2004-05-09 Thread Lili Liu

My proxy authentication code (basic host) works well unless I ran it on a
special IP address.
The internet traffic on this special IP has to go through a proxy server
(The same proxy I used in the code).
In another word, if I access internet using a browser, I have to specify a
valid proxy server. Otherwise, there is no internet access. 

My proxy authentication code is as follows:

client.getState().setAuthenticationPreemptive(true);
client.getHostConfiguration().setProxy(proxyhost,
80);
client.getState().setProxyCredentials(null,
proxyhost,
 new
UsernamePasswordCredentials(proxyusername, proxypwd));

And I got the follwing error msg:

May 9, 2004 4:13:01 PM org.apache.commons.httpclient.HttpMethodBase
readResponseBody
WARNING: Response content length is not known
status is .504
Proxy Error ( Connection timed out )
Via: 1.1 PROXY02

Pragma: no-cache

Cache-Control: no-cache

Content-Type: text/html

If I ran the program not from the special IP address, I got following
success msg:

May 9, 2004 4:07:01 PM org.apache.commons.httpclient.HttpMethodBase
processAuthenticationResponse
Via: 1.1 PROXY02

Proxy-Connection: Keep-Alive

Content-Length: 4431

Content-Type: text/html

Server: Microsoft-IIS/5.1

Date: Sun, 09 May 2004 23:07:01 GMT

WWW-Authenticate: Basic realm="INXIGHT"

---Basic realm="INXIGHT"
Trying basic authetication
OK
200


Any help is appreciated!
lili
  

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



Re: A few remaining issues to be discussed before we cut 3.0a1

2004-05-09 Thread Michael Becke
(1) Since this release is going to be incompatible with 2.0 API 
anyways,
I suggest HttpException be changed to derive from Exception and not
IOException. The only reason for not making a clear distinction between
protocol exceptions (derived from HttpException) and transport
exceptions (derived from IOException) was an attempt to keep the new
release compatible with 2.0 branch which did not quite work out
Though we have made some API changes, they have been pretty small, and 
I think they do not effect most users.  This change would certainly 
impact a number people.  My preference would be to not make this change 
for 3.0.  This change, though certainly refining, does not add any 
required functionality, and therefore I think it is not needed at this 
point.

(2) I no longer want to conceal my frustration with the way bugzilla is
managed. Frankly I am fed up. I suggest we seriously consider moving to
Jira.
I'm all for a move to Jira.

I have another question in regard to a 3.0a1 release.  How should we 
handle the web site?  My feeling is that 2.0 should remain the main 
version on the site until we move into the 3.0 beta releases.  In the 
interim we could include a link to 3.0 docs server at a separate 
location. How does this sound?

Mike

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


DO NOT REPLY [Bug 28645] - Move Content-Type to the RequestEntity

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28645

Move Content-Type to the RequestEntity





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 22:37 ---
Mike,
It looks good to me. I would only make StringRequestEntity a little more
intelligent with regards to charset attribute of the content type.

For instance, new StringRequestEntity("stuff", "text/plain; charset=UTF-8")
should be smart enough to extract the charset attribute from the content type.
Likewise new StringRequestEntity("stuff", "text/plain", "UTF-8") should be able
to add the charset attribute to the content type.

Do not worry about missing test cases at this point. I suspect the rest of the
3.0 development will be all about improving HttpClient's test coverage

Oleg

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



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

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

httpMethod.abort needed





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 22:25 ---
Looks good.

Mike

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



DO NOT REPLY [Bug 28645] - Move Content-Type to the RequestEntity

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28645

Move Content-Type to the RequestEntity





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 22:18 ---
Here's a first take on this one.  The only things I see missing at this point are 
tests.  Please take a look 
and let me know what you think.

Mike

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



A few remaining issues to be discussed before we cut 3.0a1

2004-05-09 Thread Oleg Kalnichevski
Folks,
We are basically two bug reports away from the target for the 3.0a1
release. We are damn close. Before we cut the release, I feel there is a
few issues to be discussed first.

(1) Since this release is going to be incompatible with 2.0 API anyways,
I suggest HttpException be changed to derive from Exception and not
IOException. The only reason for not making a clear distinction between
protocol exceptions (derived from HttpException) and transport
exceptions (derived from IOException) was an attempt to keep the new
release compatible with 2.0 branch which did not quite work out

(2) I no longer want to conceal my frustration with the way bugzilla is
managed. Frankly I am fed up. I suggest we seriously consider moving to
Jira.  

Oleg


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



DO NOT REPLY [Bug 28645] - Move Content-Type to the RequestEntity

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28645

Move Content-Type to the RequestEntity





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 22:05 ---
Created an attachment (id=11480)
Take 1

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



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

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

httpMethod.abort needed





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 21:53 ---
Created an attachment (id=11479)
Patch (take 2)

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



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

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

httpMethod.abort needed





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 21:53 ---
Fair enough. How about this?

Oleg

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



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

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

httpMethod.abort needed





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 21:11 ---
Hi Oleg,

This looks like the right way to handle abort.  I have a few suggestions:

 - HttpMethodBase should check the abort flag before executing just in case abort() 
was called before 
the method had a connection.
 - A test case should be added for the above case.

Other than these items I think this one is ready to go.

Mike

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



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

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

httpMethod.abort needed

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED



--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 20:34 ---
Well, it looks like this is all it takes. Writing the test case was by far the
most difficult part.

Let me know if I overlooked any potential problems

Oleg

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



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

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

httpMethod.abort needed





--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 20:32 ---
Created an attachment (id=11477)
Patch (take 1)

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



Re: Problems with HttpClient

2004-05-09 Thread Oleg Kalnichevski
Anoop,

My guess is that some of the methods simply timeout while reading the
response from the server. Unfortunately, HttpClient does not handle this
situation well. Do not use HttpMethodBase#getResponseBody or
HttpMethodBase#getResponseBodyAsString methods. They are plain broken.
Both methods are made to ignore I/O errors and return null instead of
propagating IOException-s to the caller. Whoever designed those methods
did HttpClient a bad service. Use getResponseBodyAsStream and do the
reading from the input stream as you see fit

Cheers,

Oleg


On Fri, 2004-05-07 at 17:01, Anoop Adya wrote:
> Hi
> We have developed a client solution with the help of HttpClient.
> During the trial run we noticed that it works smoothly for clients and
> server within the same domain. However, if i try to use HttpClient over
> multiple domains, I get a NullPointerException as getResponseBody returns
> null.
> Do we need to do something special to handle cross domain requests?
> Note however that the user is in the same domain as the server we try to
> access.
> 
> Any pointers would be greatly appreciated.
> 
> regards, Anoop.
> 
> 
> -
> 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]



Problems with HttpClient

2004-05-09 Thread Anoop Adya
Hi
We have developed a client solution with the help of HttpClient.
During the trial run we noticed that it works smoothly for clients and
server within the same domain. However, if i try to use HttpClient over
multiple domains, I get a NullPointerException as getResponseBody returns
null.
Do we need to do something special to handle cross domain requests?
Note however that the user is in the same domain as the server we try to
access.

Any pointers would be greatly appreciated.

regards, Anoop.


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



DO NOT REPLY [Bug 16124] - isHttp11 should have HttpClient scope

2004-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=16124

isHttp11 should have HttpClient scope

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-05-09 12:18 ---
Test cases provided.

Oleg

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