Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 17379 invoked from network); 29 Jan 2004 04:08:46 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Jan 2004 04:08:46 -0000 Received: (qmail 25605 invoked by uid 500); 29 Jan 2004 04:08:15 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 25470 invoked by uid 500); 29 Jan 2004 04:08:14 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 25297 invoked from network); 29 Jan 2004 04:08:12 -0000 Received: from unknown (HELO mxout6.cac.washington.edu) (140.142.33.20) by daedalus.apache.org with SMTP; 29 Jan 2004 04:08:12 -0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9]) by mxout6.cac.washington.edu (8.12.10+UW03.09/8.12.10+UW03.09) with ESMTP id i0T48LMO022561 for ; Wed, 28 Jan 2004 20:08:21 -0800 Received: from [10.0.1.2] (pool-151-199-58-242.bos.east.verizon.net [151.199.58.242]) (authenticated bits=0) by smtp.washington.edu (8.12.10+UW03.09/8.12.10+UW03.09) with ESMTP id i0T48IS5011924 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 28 Jan 2004 20:08:20 -0800 Mime-Version: 1.0 (Apple Message framework v612) In-Reply-To: <200401282314.i0SNEcNu013910@mxu1.u.washington.edu> References: <200401282314.i0SNEcNu013910@mxu1.u.washington.edu> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Michael Becke Subject: Re: setCredentials Fails in Applet Date: Wed, 28 Jan 2004 23:08:16 -0500 To: "Jakarta Commons Developers List" X-Mailer: Apple Mail (2.612) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Blaine, Please pose this question to the commons-httpclient mailing list . Though some of the HttpClient developers (like me) read this list, you will get more of a response there. Thanks, Mike On Jan 28, 2004, at 6:14 PM, Blaine wrote: > Howdy, > > > > I have the example MultipartFileUploadApp working as an application. > > > > When I try and do the same thing with an applet I can get everything > to work > except setCredentials. (For testing I have allowed all in the > java.policy > file) > > > > If I put my user:pw in the url it works. That is until I use > EasySSLProtocolSocketFactory to accept self signed certs then the url > trick > fails. > > > > But either way even when connecting to a non SSL server the > setCredentials > does not work from an applet. The exact same piece of code works from > an > application. > > > > I've tried > > client.getState().setCredentials(null > > ,null > > ,new > UsernamePasswordCredentials("user", "password") > > ); > > > > And I've also tried populating the first 2 arguments with the correct > values. > > > > The error I get is > > > > java.net.SocketException: Software caused connection abort: socket > write > error > > at java.net.SocketOutputStream.socketWrite0(Native Method) > > at java.net.SocketOutputStream.socketWrite(Unknown Source) > > at java.net.SocketOutputStream.write(Unknown Source) > > at com.sun.net.ssl.internal.ssl.OutputRecord.a(Unknown > Source) > > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown > Source) > > at > com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown > Source) > > at > org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write( > HttpC > onnection.java:1368) > > at java.io.BufferedOutputStream.flushBuffer(Unknown Source) > > at java.io.BufferedOutputStream.write(Unknown Source) > > at > org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FileP > art.j > ava:259) > > at > org.apache.commons.httpclient.methods.multipart.Part.send(Part.java: > 293) > > at > org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.jav > a:342 > ) > > at > org.apache.commons.httpclient.methods.MultipartPostMethod.writeRequestB > ody(M > ultipartPostMethod.java:288) > > at > org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBas > e.jav > a:2322) > > at > org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodB > ase.j > ava:2657) > > at > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.jav > a:109 > 3) > > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: > 674) > > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: > 529) > > at EnvmxScanner.testUploadFile(EnvmxScanner.java:367) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown > Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at sun.plugin.com.MethodDispatcher.invoke(Unknown Source) > > at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source) > > at sun.plugin.com.DispatchImpl$2.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native > Method) > > at sun.plugin.com.DispatchImpl.invoke(Unknown Source) > > This is the same error I get in the application if I pass an invalid > user/pw. > > > > Any help would be greatly appreciated. I need to be able to use an > applet > against a server that requires basic auth and has a self signed cert. > > > > Thanks > > Blaine > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org