Re: Cookies, Chunked-Post Threads

2003-11-12 Thread Roland Weber
Hello Sven, unless you have taken special precautions, the state object is used to store cookies. Using the same state from different threads can mix up the cookies from different clients pretty badly. Once you have the cookie problem solved, there is no issue with using the same state object. I

Re: SSL-Connection to unstrusted host

2003-11-12 Thread Roland Weber
Hello Sven, you will have to register your own secure socket factory. In that factory, you can establish SSL connections without verifying certificates. Alas, I don't remember whether such code is included in the examples or has been posted to the mailing list. But the topic itself pops up every

Re: cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol Protocol.java

2003-11-11 Thread Roland Weber
commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol Protocol.java Roland Weber wrote: Consider this: SecureProtocolSocketFactory spsf = ...; ... = new Protocol(myscheme, spsf, 666); There is nothing in the SecureProtocolSocketFactory interface that should

Re: HttpClient Revolutions

2003-11-06 Thread Roland Weber
Hi Oleg, the urge to take something apart and put it back together the way it should be is something I can sympathize with. But, as Mike pointed out, the idea was to keep the bad stuff for this release and do the overhaul for the next one. I think if you can hang on through these hard times,

Re: Cookie test case failures with Tomcat 4.1.29

2003-11-05 Thread Roland Weber
Hello Eric, From RFC 2965, HTTP State Management, Section 3: value = token | quoted-string [...] cookie = NAME = VALUE *(; set-cookie-av) VALUE = value That is part of the BNF grammar for the set-cookie2 header. All the examples in section 4 use

RE: [Https proxy] Impossible to connect

2003-11-05 Thread Roland Weber
Folks, this looks like an API error to me. The protocol security should depend on the actual type of the factory passed to the constructor, not on the type of the variable it is stored in! Looking at the code, the only difference is the assignment of true or false to the attribute secure. I

Re: Force redirect in PostMethod

2003-10-27 Thread Roland Weber
Hello Magnus, you can always obtain the location of the redirect in your application and query the page with a new method. Preferably a GET method in that case. The thing with automatic redirection of POST requests (as POST requests) is that information in the request may be sent to a place of

Re: NTLM Question

2003-10-23 Thread Roland Weber
Hello Russell, the functionality to retrieve the logon credentials from the operating system is very specific to Windows. On Linux, some projects (Samba client?) implement an extra PAM (Pluggable Authentication Module) to mimic this behavio. It's not good style for the OS itself to remember

RE: Prompting user for authentication?

2003-10-01 Thread Roland Weber
Hello David, I've taken the liberty to copy your mail as a comment to the bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10794 to get the discussion starting. I want to add some comments of my own, and the discussion should be tracked with the bug. regards, Roland [EMAIL

Re: where's the web page?

2003-09-30 Thread Roland Weber
Hello Yue, commons.apache.org is the Apache Commons project which is just getting started to develop common stuff for C/C++. What you were looking for is the Apache Jakarta Commons project, which develops common stuff for Java. I fell for the same trap a few weeks ago :-) regards, Roland

Re: Prompting user for authentication?

2003-09-30 Thread Roland Weber
Hello David, we kind of tried the same approach with OpenCard. It wasn't funny and never really worked satisfactory. Don't do it in the Http Client. Instead of using a modified HttpState that interacts with the user, just disable automatic authentication. Then, the application will get the

Re: Prompting user for authentication?

2003-09-30 Thread Roland Weber
Hello David, on second thought, if you want some kind of automatic handling, you can try to substitute a different HttpMethodDirector (in 2.1). There's probably no public API for that yet, but it's the perfect place for such stuff. regards, Roland

[OffTopic] Re: Re: doubt on HttpClient design regarding HttpMethod

2003-09-22 Thread Roland Weber
Whenever this subject comes up I can't help but think of Babylon 5 and the The Old Ones. Perhaps when the 3.0 release comes out you'll also disappear into the other realm? :-) Let's hopen Valen helps us with the architecture for 3.0 :-) cheers, Roland

Re: HTTP/1.1 status 100 help needed

2003-09-18 Thread Roland Weber
Hello Mohsin, Status code 100 is the server's way to tell a client go on, or don't give up yet. If the log you provided is complete, I'd guess it's the first case. The client sends a content length of 2966, but only one and a half lines of content are actually sent. The server is probably waiting

Re: A bug?

2003-09-02 Thread Roland Weber
. Is sounds like Yue would like to have the output stream closed before the input. Anyone have objections to this? Mike On Monday, September 1, 2003, at 07:46 AM, Roland Weber wrote: Michael Becke wrote: Any thoughts on why we close the streams and then the socket? Someone might have

Re: regression in cookie handling from 2.0 alpha3 to 2.0 rc 1 ?

2003-09-01 Thread Roland Weber
Hi Eric, I encountered the same problem. HttpClient is currently rather an HttpUserAgent and not designed for use in a proxy. I was waiting for the discussion on 3.0 architecture to start to raise this issue :-) For example, you will also run into problems when you try to handle 100-continue

Re: A bug?

2003-09-01 Thread Roland Weber
Michael Becke wrote: Any thoughts on why we close the streams and then the socket? Someone might have implemented sockets with buffered streams. Closing only the socket directly would not dispose of the buffers. Given the SocketFactory stuff, that possibility shouldn't be ruled out. just my

Re: NTLM class

2003-08-14 Thread Roland Weber
Hello Adrian, these lines may indeed be responsible for some of the configuration problems. In particular, it introduces a default dependency on the Sun implementation of JSSE, which causes problems with IBM JDKs that come with IBMs rather than Suns JSSE. Adding the security provider should not

Re: Presenting certificates for 2-way SSL authentication

2003-08-14 Thread Roland Weber
Hello Anu, this is not really an HTTP client issue. The HTTP client just uses an SSL socket obtained from an SSLSocketFactory. The default implementation for SSL sockets is Sun's JSSE. It uses it's own mechanism for presenting client certificates if requested by the server. See also Sun's JSSE

RE: NTLM Cipher Error

2003-08-09 Thread Roland Weber
Hello Dave, NoClassDefFound errors are often misleading. If the class itself is found, but one it depends upon is not, you still get the error for the class that is available and have to figure out which one is actually missing. I'm sorry I can't give you any more specific hints on this. Maybe

Re: AW: Proxied SSL connection

2003-08-06 Thread Roland Weber
Hello Christian, It depends on what you want to do. SSL is meant to establish a secure end-to-end connection, and the both ends are *usually* the client and the backend server. I wouldn't rule out the possibility to connect to the proxy using SSL. But this will only secure the connection to the

Fw: unable to find line starting with HTTP error

2003-08-01 Thread Roland Weber
OK, once more without the huge log. - Forwarded by Roland Weber/Germany/IBM on 01.08.2003 12:54 - Roland Weber 01.08.2003 12:52 To: Commons HttpClient Project [EMAIL PROTECTED] cc: From: Roland Weber/Germany/[EMAIL PROTECTED] Subject:Re

RE: SocketException : SSL Implementation not available

2003-07-25 Thread Roland Weber
Hello, from the JavaDocs of javax.net.ssl.SSLSocketFactory.getDefault(): If SSL has not been configured properly for this virtual machine, the factory will be inoperative (reporting instantiation exceptions). In order to create SSL connections, the SSL implementation needs to know the root

Re: Odd Host Header Problem

2003-07-22 Thread Roland Weber
Adrian Sutton wrote: +if (!headers[i].getName().equals(Host)) { Shouldn't this be equalsIgnoreCase() ? regards, Roland

Re: Handling HTTP 1.1 status 100 responses

2003-07-17 Thread Roland Weber
Hello Patrick, posting the request again after a 100-continue response wouldn't help. You'ld only get another 100 response for the new request as well. I don't know whether the commons client deals with 100 responses. But you can always force it to act as an HTTP/1.0 client, and servers aren't

Re: Handling HTTP 1.1 status 100 responses

2003-07-17 Thread Roland Weber
Hello Patrick, I just had a look into the source code of HttpMethodBase. The HTTP client deals with 100-continue responses, but seemingly only when an Expect: header has been sent in the first place. So you might want to add that header. You can also check for some intermediate proxies that add

RE: Handling HTTP 1.1 status 100 responses

2003-07-17 Thread Roland Weber
Ok, so this is not an issue. regards, Roland Kalnichevski, Oleg [EMAIL PROTECTED] 17.07.2003 10:54 Please respond to Commons HttpClient Project To: Commons HttpClient Project [EMAIL PROTECTED] cc: Subject:RE: Handling HTTP 1.1 status 100 responses

RE: Handling HTTP 1.1 status 100 responses

2003-07-17 Thread Roland Weber
Hello Patrick, I just found the code that ignores any 1xx responses in HttpMethodBase.readResponse(HttpState, HttpConnection) If an Expect: header is sent, the client will wait for the 100-continue response before sending the request body, that's what I found first. Are you using an older

RE: Handling HTTP 1.1 status 100 responses

2003-07-17 Thread Roland Weber
Hello Patrick, the current version reads and hides all 1xx responses. The application will only see the final, non-1xx response and status code. I think you should upgrade. regards, Roland

Re: How to post to a URL with Checkbox ?

2003-07-07 Thread Roland Weber
input type=checkbox name=cb value=CHECKED regards, Roland

Re: Array of values ???

2003-07-07 Thread Roland Weber
The following is a HTML form with a set of same name. How can use HttpClient to post them ?? PostMethod.addParameter(...) allows the same parameter name to be used multiple times. Or you can try a comma-separated list of the values you want to send. regards, Roland

<    1   2