Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 12142 invoked from network); 7 Nov 2007 17:52:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2007 17:52:46 -0000 Received: (qmail 62804 invoked by uid 500); 7 Nov 2007 17:52:33 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 62627 invoked by uid 500); 7 Nov 2007 17:52:32 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 62616 invoked by uid 99); 7 Nov 2007 17:52:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2007 09:52:32 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [64.147.176.149] (HELO itc-365-mx02.itconvergence.com) (64.147.176.149) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2007 17:53:04 +0000 X-ASG-Debug-ID: 1194457929-355f00060000-MUsSrZ X-Barracuda-URL: http://64.147.176.149:8000/cgi-bin/mark.cgi Received: from ITC-365-EXCS01.itconvergence.com (localhost [127.0.0.1]) by itc-365-mx02.itconvergence.com (Spam Firewall) with ESMTP id 220AB112769 for ; Wed, 7 Nov 2007 09:52:09 -0800 (PST) Received: from ITC-365-EXCS01.itconvergence.com (itc-365-exnd02.itconvergence.com [64.147.176.223]) by itc-365-mx02.itconvergence.com with ESMTP id YAOAQK9MYX9uo478 for ; Wed, 07 Nov 2007 09:52:09 -0800 (PST) X-ASG-Whitelist: Client X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C82166.EAD12F6A" X-ASG-Orig-Subj: Problem with QueryString Subject: Problem with QueryString Date: Wed, 7 Nov 2007 09:52:09 -0800 Message-ID: <63FA076F464DF14ABA5F83449F0D1E1C7E9A24@ITC-365-EXCS01.itconvergence.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with QueryString Thread-Index: AcghZur7RoaLRs2cRl6a1QW09Dm9QQ== From: "Agustin Palacios" To: X-Barracuda-Connect: itc-365-exnd02.itconvergence.com[64.147.176.223] X-Barracuda-Start-Time: 1194457929 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at itconvergence.com X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C82166.EAD12F6A Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm experiencing the following problem: =20 1) If I write the (A) url in a browser, it works ok ( the user poe = is successfully logged into the appliacation ) 2) If I write the (B) url in a browser, it also works ok ( the = user e.poe is successfully logged into the appliacation ) 3) If I execute the above source code using poe user, it works ok = ( HttpStatus.SC_OK ) 4) If I execute the above source code using e.poe user, it does = NOT work ( HttpStatus.SC_TEMPORARY_REDIRECT ) 5) If I execute the above source code using an invalid user, I = received the same response as in (4) ( HttpStatus.SC_TEMPORARY_REDIRECT = ) =20 Is something wrong in the above source code? =20 N.B.: does the . ( dot ) in the user may be causing this problem? =20 =20 Thanks in advance, Agust=EDn =20 =20 (A) http://www.mysite.com/index.cfm?username=3Dpoe&password=3Dpassword =20 (B) = http://www.mysite.com/index.cfm?username=3De.poe&password=3Dpassword =20 =20 HttpClient client =3D new HttpClient(); =20 PostMethod post =3D new = PostMethod("http://www.mysite.com/index.cfg");=20 NameValuePair[] data =3D { new NameValuePair("username", = "e.poe"), new NameValuePair("password", "password") }; post.setQueryString(data); =20 =20 = post.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new = DefaultHttpMethodRetryHandler(3, false)); =20 try { =20 int c =3D client.executeMethod(post); =20 if (c =3D=3D HttpStatus.SC_OK) { System.out.println("Ok"); } else { System.out.println("Failed"); } =20 } catch (HttpException e) { // TODO Auto-generated catch block e.printStackTrace(); =20 } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { post.releaseConnection(); } ------_=_NextPart_001_01C82166.EAD12F6A--