RE: Is it possible to send and email using HTTPCLIENT?

2004-10-22 Thread Roland Weber
www.mercury.com www.mercury.com -Original Message- From: Gerdes, Tom [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 8:08 AM To: Commons HttpClient Project Subject: RE: Is it possible to send and email using HTTPCLIENT? Thanks! -Original Message- From: Roland Weber

Re: Auto-detecting proxy settings in a standalone Java app

2004-10-22 Thread Roland Weber
Hello Chris, native Windows applications just work because they access native Windows APIs to read the proxy settings, which are probably stored somewhere in the Windows registry. Browsers and the Java Plugin for browsers are native Windows applications, and therefore can do just that. The only

Re: Auto-detecting proxy settings in a standalone Java app

2004-10-22 Thread Roland Weber
that a startup script written in VBScript appears to be the best solution for the problem Oleg On Fri, 2004-10-22 at 10:54, Ortwin Glück wrote: Roland Weber wrote: Wait, here is another idea: you could write a startup script that does the proxy settings lookup, then passes the settings

Re: Is it possible to send and email using HTTPCLIENT?

2004-10-20 Thread Roland Weber
Hello Tom, no it is not. Protocols for transferring EMail are SMTP or IMAP. HttpClient implements HTTP. Browsers do lots more than just HTTP, that's why most of them chose to implement mailing functionality as well. But HttpClient is intentionally focused on HTTP alone, which is tricky enough.

Re: HTTP Version Not Supported Error

2004-10-18 Thread Roland Weber
); UploadMethod method = new UploadMethod(ServletAddress); method.setRequestConentLength(file.length); method.setRequestHeader(Content-type, application/octet-stream); method.setRequestBodyAsStream(new FileInputStream(file)); int status = client.execute(method); Thanks agiain, Nick From: Roland

Re: HTTP Version Not Supported Error

2004-10-18 Thread Roland Weber
be 2 gigs? How could I upload files larger than 2 gigs besides using chunked encoding? Thanks for your help, Nick From: Roland Weber [EMAIL PROTECTED] Reply-To: Commons HttpClient Project [EMAIL PROTECTED] To: Commons HttpClient Project [EMAIL PROTECTED] Subject: Re: HTTP Version

Re: HTTP Version Not Supported Error

2004-10-15 Thread Roland Weber
Hello Nick, by implementing ...methods.multipart.PartSource, you can supply your own InputStream. Using HttpMethod.getResponseBodyAsStream(), you have direct access to the input stream of the response. What more control do you need? The problem you report suggests that your version of the post

Re: [Bugzilla] vs [JIRA] revisited

2004-10-11 Thread Roland Weber
Hi Oleg, could we synchronize the switch with the 4.0 implementation? In other words, continue with Bugzilla for 2.0 and 3.0, but once work gets started on 4.0, where the API changes and the package names probably change, then the bug tracking system changes as well? cheers, Roland

Re: HttpClient query...

2004-10-07 Thread Roland Weber
is generating null pointer exception. Now I need to make the functionality of creating the multipart request at client side, I am planning to do it in the applet. Is it the right way to go for an applet, or can you suggest me some other solution.. thanks, Srinivas. Roland Weber wrote: Hello

Re: HttpClient query...

2004-10-06 Thread Roland Weber
is generating null pointer exception. Now I need to make the functionality of creating the multipart request at client side, I am planning to do it in the applet. Is it the right way to go for an applet, or can you suggest me some other solution.. thanks, Srinivas. Roland Weber [EMAIL

Re: HttpClient query...

2004-10-05 Thread Roland Weber
Hello Srinivas, if the session is handled by a session cookie, just make sure you use the same HttpState object for all requests. That should happen automagically if you do nothing special and re-use one HttpClient for all requests. If the server uses URL rewriting because it believes that the

Re: HttpClient query...

2004-10-05 Thread Roland Weber
with cookies. Is there a solution without using cookies or I must go for cookies.. thanks, Srinivas Roland Weber [EMAIL PROTECTED] wrote: Hello Srinivas, if the session is handled by a session cookie, just make sure you use the same HttpState object for all requests. That should happen automagically

java.net.SocketException: Connection reset

2004-10-04 Thread Roland Weber
: was Roland Weber/Germany/IBM received

java.net.SocketException: Connection reset

2004-10-04 Thread Roland Weber
: was Roland Weber/Germany/IBM received

Re: threads problem with many connections

2004-10-01 Thread Roland Weber
Hello Guillaume, have you considered implementing your own connection manager? But I would start with tuning the parameters of the existing one. If it is a realistic scenario that each service thread executes a POST at the same time, increase the number of connections in total and per host to

Re: Quick Question

2004-09-29 Thread Roland Weber
Hi Rudy, Hentzen, Rudy [EMAIL PROTECTED] wrote on 29.09.2004 15:16:34: Another thing, it is possible to, for example, get all the of the form actions from a html page, I have managed to get what I need using reg exps but just wondering if it is in the HttpClient package??? It is not,

Re: Unable to use post with a site

2004-09-13 Thread Roland Weber
Hello, first, you should try to add the following: method.addParameter(abcv, View) because a submit button also defines a parameter when it is given a name. Due to the onclick handler, there should be a POST request as well as the modification of the location. I can't tell whether the location

Re: URLGetMethod.executeMethod is hanging under multi threaded environment

2004-09-06 Thread Roland Weber
Hello, unfortunately, you left out the part where the HttpClient instance is created. Did you remember to install a MultiThreadedHttpConnectionManager? If the same client object is passed to several of the SaveAttachmentThread instances, you need the thread-safe connection manager. But the main

RE: Response content length is not known

2004-08-18 Thread Roland Weber
Hi Oleg, Kalnichevski, Oleg [EMAIL PROTECTED] wrote on 18.08.2004 11:26:10: HTTP/1.0 200 OK[\r][\n] Date: Thu, 19 Aug 2004 02:01:34 GMT[\r][\n] Server: Oracle9iAS (9.0.3.0.0) Containers for J2EE[\r][\n] Content-Type: text/html[\r][\n] As you can see the response does not contain a

Re: Invoke a httpclient in a EJB

2004-08-05 Thread Roland Weber
Hello Karthi, HttpClient does create sockets. And it creates threads in some situations, for example when using timeouts while creating sockets. It's definitely not EJB friendly. cheers, Roland Karthikeyani K [EMAIL PROTECTED] 04.08.2004 17:20 Please respond to Commons HttpClient Project

Re: URL escaping

2004-07-08 Thread Roland Weber
Hi Steve, the comma is a reserved character, and the vertical bar is an excluded character in RFC 2396 (URI Generic Syntax). Try to escape just those characters in the part before ?. cheers, Roland Steve Johnson [EMAIL PROTECTED] 07.07.2004 17:53 Please respond to Commons HttpClient

RE: NTLM authentication to an MS Exchange web page account using HTTP Client V2.0

2004-07-01 Thread Roland Weber
Hi Andre-John, I have just got my friend to try connecting to out intranet web server with Safari and it does not support NTLM authentication. The only two web clients on the platform that do suppor it are Mozilla variety and Internet Explorer. Though I can't confirm whether they use the

Re: NTLM authentication to an MS Exchange web page account using HTTP Client V2.0

2004-06-30 Thread Roland Weber
PROTECTED] cc Subject Re: NTLM authentication to an MS Exchange web page account using HTTP Client V2.0 Roland Weber wrote: If the latter is true, there still might be a platform-independent class somewhere in sun.* or com.sun.*. Roland, you can safely call the sun.* and com.sun.* packages

Re: RESULT: possible bugs:( Re: Resend: disable httpclient logging)

2004-06-22 Thread Roland Weber
Hi Odi, Maybe we should also change the wirelog logger to something like 'org.apache.commons.httpclient.wire'. The JLogFactory uses different methods to obtain loggers for a class and by name. Prefixing the name with a package is OK by me, but I'd prefer to leave some distinction in the

Re: Invalid RSA modulus size

2004-06-20 Thread Roland Weber
Hello Tim, from what I know about the export regulations, shipping working crypto code that is just disabled through some configuration file is not acceptable. You will have to obtain a full-strength JCE/JSSE implementation. Either a US-only version of the JDK, or a non-US implementation of the

Re: Question regarding Bug 20744

2004-06-20 Thread Roland Weber
body = end = __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail [attachment src.tar.gz deleted by Roland Weber/Germany/IBM

Re: Invalid RSA modulus size

2004-06-20 Thread Roland Weber
whose governments mandate restrictions. Users in those countries can download an appropriate bundle, and the JCE framework will enforce the specified restrictions. --- - Original Message - From: Roland Weber [EMAIL PROTECTED] Date: Monday, June 21, 2004 5:06 pm Subject: Re: Invalid RSA

Re: HttpClient 2.0 problems

2004-06-14 Thread Roland Weber
Hello Arturo, what exactly do you chance when it works? From a quick look at the code, I suggest the following modifications: - don't recycle the method, create a new one - invoke releaseConnection() in a finally block, no matter whether there was an exception or not The unable to find line

Re: HttpException question

2004-06-14 Thread Roland Weber
Hello Xavier, if the server sends an HTTP status code, there is no need for an exception. Just use HttpMethod.getStatusCode(). If there is an exception, there is no status code to include in the message. Unless you throw your own exception, in which case you are free to generate every message

Re: Retrieving server side certificate durring handshake?

2004-06-07 Thread Roland Weber
Hello Marc, the latter is the case. For the HTTP protocol, the certificate doesn't matter. Once the secure connection is established, HttpClient just uses it. Whether any certificates were involved when the factory established the connection is of no interest to HttpClient. You may have to

Re: authenticate problem

2004-06-03 Thread Roland Weber
Hello Jing, null is the default realm, where the HttpClient looks if there are no credentials for the specific realm, or if it doesn't know the realm because it performs preemptive authentication. Why the server accepts empty credentials is a different question. Probably a misconfiguration on

Re: HttpConnection and HttpState reuse problem

2004-06-03 Thread Roland Weber
Hello Himanshu, you can create your own HttpState object and pass it to each method invocation. That should solve your first problem. Why don't you leave the connection re-use to the connection manager? For an application, it shouldn't matter at all whether it is the same or a different

Re: Connection Accounting Problem

2004-06-01 Thread Roland Weber
Hi Mike, deprecate getConnectionsInUse(), replace with getConnectionsInPool() ? Introduce something like garbageCollectConnections() or deleteIdleConnections() for people who really want to throw away the closed connections ? I'd stick with your option 1 until there is a case where the other

Re: does HttpClient transparently send proxy auth after getting HTTP 403 code?

2004-05-27 Thread Roland Weber
Hello Alex, HttpClient can send the authentication data automatically. Use HttpMethod.setDoAuthentication(true) to tell it to. You may want to set the credentials for the particular host and port of the proxy, rather than as default credentials. This will prevent them from being sent to the

Re: Sun's javax.net.ssl and HttpClient

2004-05-19 Thread Roland Weber
Hello Himanshu, Http Client and javax.net.ssl are in no way comparable at all. SSL is a technique to secure connections on the transport layer. HTTP is a protocol for client/server communication, which runs on top of a transport layer. By combining HTTP and SSL, you get HTTPS. For example, you

Re: HttpClient initialization, when/where?

2004-05-12 Thread Roland Weber
Hello, you need one HttpState for each thread, since the cookies are stored there. Creating a new state for each request will not work, unless the threads manage the cookies themselves. The HttpClient is associated with a connection pool. If you require independently configured connection pools

Re: HttpClient initialization, when/where?

2004-05-12 Thread Roland Weber
Hi Duzayak (?), the MultiThreadedHCM is called so because it allows for multiple threads to use the same HttpClient. It has to be used if the application is multithreaded. The connection pool limits the number of simultaneous connections, to a particular host and in general. It keeps resource

Re: Bug in HTTPUrl?

2004-04-28 Thread Roland Weber
Hi Oleg, see RFC 2396, URI: Generic Syntax, section 3.2.2: userinfo@host:port Some URL schemes use the format user:password in the userinfo field. This practice is NOT RECOMMENDED, because the passing of authentication information in clear text (such as URI) has proven to be a

RE: customizing debugging levels per httpclient instance

2004-04-28 Thread Roland Weber
, 2004-04-27 at 15:39, Roland Weber wrote: Hi Gareth, thanks a lot for the pointer. The concept is very close to what I need. The problem is that I'm not using log4j, since the application uses a different logging framework. But I might borrow the idea of attaching some context to the thread

Re: Bug in HTTPUrl?

2004-04-28 Thread Roland Weber
, Roland Ortwin Glück [EMAIL PROTECTED] 28.04.2004 08:23 Please respond to Commons HttpClient Project To: Commons HttpClient Project [EMAIL PROTECTED] cc: Subject:Re: Bug in HTTPUrl? Roland Weber wrote: Hi Oleg, see RFC 2396, URI: Generic Syntax

RE: Yahoo login with Httpclient

2004-04-28 Thread Roland Weber
Hello Frank, the problem with the Sun site is that HttpClient does not support cross host redirects. See here for directions: http://jakarta.apache.org/commons/httpclient/redirects.html For Yahoo with it's HTTPS URL, you have to install or enable SSL support. See here for directions:

RE: customizing debugging levels per httpclient instance

2004-04-27 Thread Roland Weber
Hi Oleg, I had a similar problem when I started using HttpClient last year. Not thread-based though. I'm in a servlet engine, so I don't know which thread will be processing the request that uses HttpClient. I'd like to have different log settings per HttpClient instance, but that's not possible

RE: customizing debugging levels per httpclient instance

2004-04-27 Thread Roland Weber
of thing is to use Nested Diagnostic Context's (NDC) in log4j have a look at the section on them in: http://logging.apache.org/log4j/docs/manual.html Not quite what you want I know, but it will give you something to grep on. Gareth Roland Weber [EMAIL PROTECTED

Re: HttpClient for Https gives Unrecognized SSL message..

2004-04-19 Thread Roland Weber
Hello Raj, could you post a code example? I am a bit confused about the https for the same link part. The protocol is usually part of the link. If you managed to convice HttpClient to use SSL, while the server still believes it is plain HTTP, that would explain the error message. cheers,

RE: HttpClient for Https gives Unrecognized SSL message..

2004-04-19 Thread Roland Weber
[ ] requestParameters = { new HttpRequestParameter( method, _method ), new HttpRequestParameter(xml,xmlRequest) }; * -Original Message- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Monday, April 19, 2004 4:11 PM

Broken link on website

2004-04-19 Thread Roland Weber
Hi guys, I just found a broken link in the Logging Guide. The Commons Logging home page has moved from http://jakarta.apache.org/commons/logging.html to http://jakarta.apache.org/commons/logging/ cheers, Roland

Re: SOCKS Proxies

2004-04-15 Thread Roland Weber
Hi Sam, SOCKS is a socket level protocol that is supposed to be transparent for the application using the sockets. So you best take a look at org.apache.commons.httpclient.protocol.ProtocolSocketFactory. By implementing your own ProtocolSocketFactory, you are free to return a plain socket or one

Re: Tunneling non-HTTP through a web proxy with HttpClient

2004-03-26 Thread Roland Weber
Hi Mike Mike Michael Becke wrote: Given that HttpClient is in the business of communicating using HTTP, it is not terribly well suited for other purposes. Since CONNECT is also an HTTP method, it is not totally out of scope for the HttpClient. From RFC 2616, section 9.9: This

Re: Tunneling non-HTTP through a web proxy with HttpClient

2004-03-26 Thread Roland Weber
Hello Mike, (for 4.0) we can wrap input and output streams around those of the underlying socket. Connection reuse is not an option for that method anyway, and by help of the wrapper we can cut any references to the underlying socket's input and output streams as soon as the connection manager

RE: Tunneling non-HTTP through a web proxy with HttpClient

2004-03-26 Thread Roland Weber
Hi Oleg, I guess it's just a typo, but to be sure: The CONNECT method is for establishing a generic tunnel through an HTTP proxy. SSL tunneling is just one application of that. cheers, Roland Kalnichevski, Oleg [EMAIL PROTECTED] 26.03.2004 14:49 Please respond to Commons HttpClient

RE: question re: cookies

2004-03-25 Thread Roland Weber
-Original Message- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Thursday, March 25, 2004 8:39 To: Commons HttpClient Project Subject: RE: question re: cookies Ah yes, cookie headers that were manually set used to get overridden. As far as I remember, that changed a while back. Though I

Re: question re: cookies

2004-03-24 Thread Roland Weber
Hello Gil, two options. If you only need to get the cookie for your application, then access the header directly instead of looking into the http state. That's probably what your old code did, right? Otherwise, implement and configure your own cookie policy. Copy the default implementation that

RE: question re: cookies

2004-03-24 Thread Roland Weber
()operation; I don't want to mix the semantics (such as getHeader()/setCookie()). Sounds like the cookie policy is the way to go. -Original Message- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 10:51 PM To: Commons HttpClient Project Subject: Re: question re

Re: NTLM credentials.

2004-03-22 Thread Roland Weber
Hello Brian, JDK for Windows uses Windows specific code to get the user's login credentials. HttpClient does not use Windows specific code, hence you're out of luck. You could analyse what the JDK does and replicate that in your application. But I guess you'd have to write native code to access

Re: Memory Leaks when web server hangs

2004-03-21 Thread Roland Weber
manager are you using? Mike On Mar 19, 2004, at 1:21 PM, Eric Bloch wrote: Hey there, I create/destroy http clients but always have them use the same connection manager. Will that cause thread thrashing? Thanks, -Eric Roland Weber wrote: Hello Srini, you should *not* create a new

Re: Multithreaded Connection manager question and 400+ servers

2004-03-21 Thread Roland Weber
Hello Andre, you should try to get some real-life data to decide on connection management. Like a trace on how many connections are made to which hosts in what frequency. Then you can verify whether the frequently used hosts support connection keep-alive or not. I agree with Michael's assessment

Re: Repost: Authentication question

2004-03-21 Thread Roland Weber
Hello, use HttpMethod.setDoAuthentication(false). Then, your application will get the 40x response directly and can check the returned headers for the auth scheme and parameters. If it's basic auth, you should enable preemptive authentication after providing the credentials, to avoid unnecessary

Re: cookie version info

2004-03-19 Thread Roland Weber
Hello, there are two versions of the Cookie spec, the old one (RFC 2109) and the new one (RFC 2965). Cookies that adhere to the new spec include version info when sent back to the server. RFC 2965 also includes information about compatibility with older servers.

RE: cookie version info

2004-03-19 Thread Roland Weber
? Is there any way to strip it off using httpclient? Regards, Kazuya Imabayashi -Original Message- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 5:16 PM To: Commons HttpClient Project Subject: Re: cookie version info Hello, there are two versions of the Cookie spec

Re: Anmelden am Server

2004-03-18 Thread Roland Weber
Yes, that should work. You may want to set the preemptive authentication flag on the method, to avoid an authentication required response for the initial request. cheers, Roland martin hilpert [EMAIL PROTECTED] 18.03.2004 13:34 Please respond to Commons HttpClient Project To:

RE: [PROPOSAL][DRAFT] Promote HttpClient to Jakarta level

2004-03-18 Thread Roland Weber
Oleg wrote: I really think Java 1.3 does not bring anything to the table as far as HTTP communication is concerned. Ok, I agree. Just wanted to make sure we didn't miss a chance. cheers, Roland

Re: httpclient dont support ö ?

2004-03-18 Thread Roland Weber
Hello Martin, that's probably a missing content encoding or character set in the file part you are trying to send. This problem pops up on a regular basis, you will find information in the mailing list archive not too far back. By the way, if you expect anyone else to answer your questions, you

Re: question about SimpleHttpConnectionManager

2004-03-18 Thread Roland Weber
Hello Eric, you send a connection: close header with the request. I'm not sure whether using HTTP/1.0 has the same effect. cheers, Roland Eric Bloch [EMAIL PROTECTED] 19.03.2004 05:04 Please respond to Commons HttpClient Project To: Commons HttpClient Project [EMAIL

Re: TestWebappBasicAuth fails on IIS

2004-03-18 Thread Roland Weber
figure out how to make IIS not to intercept the basic authentication. The later one is the perfer way. but still no clue yet. -Dan From: Roland Weber [EMAIL PROTECTED] Reply-To: Commons HttpClient Project [EMAIL PROTECTED] To: Commons HttpClient Project [EMAIL PROTECTED] Subject: Re

Re: @author tags

2004-03-16 Thread Roland Weber
Hello Eric, I was thinking about some kind of metrics, too. Not as advanced as yours, of course :-) But then I felt that a ranking is not the best approach. It may lure people to use tricks just to improve their ranking. There should be something that indicates the kind and volume of

Re: @author tags

2004-03-16 Thread Roland Weber
Hello Michael, I hope this mail is still readable once it is converted to text-only format... Fuel to this fire, I think, is fine. Why not talk it out? Primarily because this mailing list is not for legal discussion, and we'll never ever talk it out. You are a lawyer, most of us are not.

RE: @author tags

2004-03-16 Thread Roland Weber
Hello all, Michael McGrady wrote: This is a really good idea, Oleg. I am surprised, frankly, that we allow people to use the @author tags without having signed the agreement first. That would be a real problem. So that is one of the reasons for this discussion. If you feel that @authors

RE: [Cactus] Gump build failures for the past 2 weeks

2004-03-14 Thread Roland Weber
Hello Vincent, the code should not add an Authorization header. HttpClient does that automatically, and probably removes the one you set in the process. Instead: - store uid/pwd in the HttpState as default credential - enable preemptive authentication on the HttpMethod The correct Authorization

Re: @author tags

2004-03-12 Thread Roland Weber
Hi folks, let me add a few lines to the discussion... Dan Christopherson wrote: I think that owner is intended in the sense of the primary person responsible for maintaining, not in the sense of the legel owner. Yes, that was - and is - exactly my understanding of the term code owner.

Re: @author tags

2004-03-12 Thread Roland Weber
Hello Chris, I don't see that either. But if some of the top Apache guys feel, believe or know otherwise, that's good enough for me. If the only purpose of the tags is to feature contributor names in a prominent place - namely the source code - then the real question becomes whether we can

Re: @author tags

2004-03-12 Thread Roland Weber
reason. There is no reason that has been given that I find at all persuasive to not know who coded something. The deliberate creation of ignorance about these matters should be suspicious to our common sense. THE LEGAL ASPECT IN THIS DISCUSSION IS JUST PLAIN MISTAKEN Roland Weber wrote

Re: @author tags

2004-03-11 Thread Roland Weber
That's exactly the problem: not necessarily who edited the file last, but the owner There are people who see a chance to contribute an enhancement or bug fix. We'd like to have them listed as someone who contributed, but *without* the responsibility of being the owner of the code. cheers,

Re: Downloading Images

2004-03-11 Thread Roland Weber
Except for error handling and stuff, this is the right approach. To store the image, you have to create a FileOutputStream and copy the response data there. See also the section Read the Response in the tutorial: http://jakarta.apache.org/commons/httpclient/tutorial.html cheers, Roland

Re: file transfer through firewall

2004-03-03 Thread Roland Weber
Hello Ramakrishna, if you are developing the server system, then HttpClient is not the way to go. If you are developing a client application, then it is. Yes, users should authenticate. cheers, Roland Ramakrishna Kuppa (Bangalore) [EMAIL PROTECTED] 03.03.2004 08:59 Please respond to

Re: [RFE] provide request entities in a more abstract way

2004-02-26 Thread Roland Weber
Hello Odi, is this meant as an extension or as a replacement for directly passing the InputStream? In the second case, I would add something like isRepeatable() to handle cases where it is indeed not possible to read the data twice. I'd prefer an explicit check to some exception being thrown from

RE: [RFE] provide request entities in a more abstract way

2004-02-26 Thread Roland Weber
Hello Moh, you are assuming preemptive authentication. In general, authentication is triggered by a 40x response from the server, which means the request has already been sent. best regards, Roland Rezaei, Mohammad A. [EMAIL PROTECTED] 26.02.2004 15:57 Please respond to Commons HttpClient

Re: Cookie rejected problem

2004-02-24 Thread Roland Weber
Hello Xavier, your first action should be to contact the administrator of that web site and tell him that the cookie configuration is all screwed up. No browser should accept a cookie for .smals-mvm.be coming from socialsecurity.be, let alone HttpClient. It would be a security violation to do so.

Re: two post requests

2004-02-23 Thread Roland Weber
Hello Diana, there are some possible cases... you'll have to analyse the page returned as the response to the first POST request. Easy case: The second POST request is just a generic request with fixed data, such as parameter confirm set to true. You extend your program to send that fixed second

Re: Cookie Problem

2004-02-16 Thread Roland Weber
Hello Hareesh, the cookie shouldn't include commas in the first place, that's a violation of the respective specification. But since you have to access that page, try setting a different cookie policy. Check out the options in org.apache.commons.httpclient.cookie.CookiePolicy Try NETSCAPE and

Re: Forms Login with Iframe

2004-02-16 Thread Roland Weber
Hello Jeannie, where exactly do you want to use the HttpClient? Are you writing a Java browser, like HotJava? Do you want to connect from an applet? A standalone Java application? A servlet? Logging in and fetching the page can of course be done. I just wonder how to show the content in an

Re: Forms Login with Iframe

2004-02-16 Thread Roland Weber
to Commons HttpClient Project To: [EMAIL PROTECTED] cc: Subject:Re: Forms Login with Iframe Hi Roland, Yes, my application would be in a browser. It will be a JSP/servlet application running in WebSphere. Thanks! Jeannie Roland Weber [EMAIL PROTECTED] wrote

RE: GetMethod Performance

2004-02-16 Thread Roland Weber
Hello Ben, without digging into details, I'd say the profile indicates some problems with the crypto algorithms. They seem to get interpreted, instead of being compiled by a JIT or branching into native code. Since your test only fetches on page in a single request, it won't make much of a

Re: GetMethod Performance

2004-02-15 Thread Roland Weber
Hi Ben, that is indeed a big difference. Two questions: 1. The HttpClient example uses IP address 192.168.0.1, the Socket example connects to 192.168.0.11 Is that a typo, or do you indeed access a different host? If that different host is a caching proxy, that would be an

RE: GetMethod Performance

2004-02-15 Thread Roland Weber
a different JVM configuration? -Original Message- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Monday, 16 February 2004 5:25 PM To: Commons HttpClient Project Subject: Re: GetMethod Performance Hi Ben, that is indeed a big difference. Two questions: 1. The HttpClient example uses IP

Re: setting User agent? Parsing HTML?

2004-02-09 Thread Roland Weber
Hello Tom, You can set the USER_AGENT property in the HttpMethodParams. HTML parsing is totally out of scope of the HTTP client. There are other projects that provide HTML parsers, including one on Sourceforge: http://sourceforge.net/projects/javahtmlparser You may also want to check the open

Re: Performance - ConnectionManager vs none?

2004-02-04 Thread Roland Weber
Hello André-John, if you continue to create a new HTTP Client in each thread, there is no point in using the multi threaded connection manager. That makes sense only if several threads share the same HTTP Client. That's more effort than just changing a single line of code. As Odi pointed out,

RE: DO NOT REPLY [Bug 10794] - User interaction for authentication

2004-02-02 Thread Roland Weber
Hi Oleg, I trust you on this. Unfortunately, I currently haven't got the time to look at the patch. From the discussion I got the feeling that we agree. cheers, Roland Kalnichevski, Oleg [EMAIL PROTECTED] 02.02.2004 11:36 Please respond to Commons HttpClient Project To:

Re: Promote HttpClient out of commons?

2004-02-01 Thread Roland Weber
Hello folks, after taking a look on the project list at http://jakarta.apache.org/, I'd feel comfortable to see the HTTP Client among them. It sure wouldn't hurt it's visibility either. I see two major points why it should not be promoted to top level status. The technical reason is the pendig

Re: access denied exception

2004-01-30 Thread Roland Weber
Hello, this looks like a Java2 security problem. Two options: Hack: Disable Java2 security. Clean: grant your application the necessary permissions in the java.policy file The file should be in ${JAVA_HOME}/jre/lib/security/ I hope someone else can come up with the exact permission

Re: Why on earth do we differenciate between proxy and host credentials?

2004-01-29 Thread Roland Weber
Hello Oleg, from a technical standpoint, host and port would be sufficient to differentiate between a proxy and HTTP server on the same machine. But if a dialog is presented to a user, that dialog should state whether the user is supposed to enter uid/pwd for the proxy or for the host. Most users

Re: PostMethod.setFollowRedirects(true); - do nothing

2004-01-29 Thread Roland Weber
Hello Jean-Remi, 1. make the POST request 2. look for the Location header 3. make the GET request to the Location The output you copied shows only the requests you send. The Location header is not in the request, it is in the response to step 1. Therefore, I suspect you made a mistake in step 2,

Re: Connection Reset Error

2004-01-28 Thread Roland Weber
. If that approach did happen to work, it would be sheer chance. -Eric. Roland Weber wrote: I wonder wheter a status 100 response can be used for this purpose. HttpClient would simply ignore it and wait for the next response. regards, Roland Ortwin Glück [EMAIL PROTECTED] 27.01.2004 08:10 Please respond

Re: Connection Reset Error

2004-01-27 Thread Roland Weber
I wonder wheter a status 100 response can be used for this purpose. HttpClient would simply ignore it and wait for the next response. regards, Roland Ortwin Glück [EMAIL PROTECTED] 27.01.2004 08:10 Please respond to Commons HttpClient Project To: Commons HttpClient Project

Re: Odd problem

2004-01-27 Thread Roland Weber
Hello Brett, the 11b should be part of the chunked encoding used by the server to send back the error page. No reason to worry. I wonder why the server reports a missing page / although that's not the page you requested. Without knowledge of the server application, it is hard to tell how the

Re: Horseplay - https

2004-01-12 Thread Roland Weber
Hello Charles, you suspect correctly, the login form comes from https://reg.racingpost.co.uk/cde/login_iframe.sd as you can easily verify by accessing that URL directly in your browser. From there, the login form is sent as a POST request to reg.racingpost.co.uk HttpClient can deal with the

RE: refresh header proxy

2004-01-12 Thread Roland Weber
Hello David, are you sure the browsers are handling the HTTP header field and not the contents of the HTML document returned? The syntax of the header field resembles the typical HTML refresh statement: meta http-equiv=refresh content=0; URL=... It is common (maybe even standard?) behaviour for

Re: Make HttpClient pick Basic Auth over NTLM?

2003-12-04 Thread Roland Weber
Hello, try client.getState().setAuthenticationPreemptive(true); I'm not sure whether HTTP Client evaluates this flag for proxy and target server, or just for the target server. In the first case, it should have the desired effect. My guess is that when HTTP Client has the choice between Basic

Re: Make HttpClient pick Basic Auth over NTLM?

2003-12-04 Thread Roland Weber
Hello Eric, it's a question of interpretation, isn't it? If we provide an option to prefer Basic auth over NTLM, we violate the RFC. If we provide an option to *disable* NTLM in certain cases, HttpClient would no longer understand it, and has to select Basic following the rules of the RFC :-)

Re: Cookies, Chunked-Post Threads

2003-11-13 Thread Roland Weber
Hello Sven, browsers make requests in parallel for *one* user! Meaning that all the cookies returned end up in the same cookie store, as they do here. A proxy servlet will make requests for different users (browsers) and therefore has to maintain a different state for each user. That state is

Re: Cookies, Chunked-Post Threads

2003-11-12 Thread Roland Weber
Hello Sven, 1. Cookie Container: Let every session use it's own HttpState object. That's where HTTP Client stores it's cookies. The only problem is that it's not serializable, so it won't work with persistent sessions. 2. Thread Safety: HTTP Client is thread safe as long as you use a thread safe

  1   2   >