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
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
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
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,
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
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
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
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
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
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
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
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
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
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
. 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
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
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
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
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
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
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
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
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
Adrian Sutton wrote:
+if (!headers[i].getName().equals(Host)) {
Shouldn't this be equalsIgnoreCase() ?
regards,
Roland
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
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
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
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
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
input type=checkbox name=cb value=CHECKED
regards,
Roland
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
101 - 131 of 131 matches
Mail list logo