W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

URLDecoder mystery

From: Scott Jewell <jewellsc@pop.mts.kpnw.org>
Date: Wed, 04 Dec 1996 12:35:52 -0800
To: www-jigsaw@w3.org
Message-id: <32A5E0A8.58F7@pop.mts.kpnw.org>

I've been going nuts trying to figure out what I've done wrong!

I've subclassed PostableResource, basically copied the handle() method
which is a while hasMoreElements on an enumeration object, and placed an
if(name == "PARM") statement in the loop looking for a particular posted
parameter.  My problem is that the if test never tests true!  I can use
println to display the parameter names and they appear OK, but the if
test is failing for some reason.

Is URLDecoder returning an array of bytes rather than a String object
perhaps?  Maybe this is a Java question, but I only seem to have this
problem with the URLDecoder.

Here's the code:

	Enumeration   e = data.keys() ;
	// Parse certificate request variables:
	while ( e.hasMoreElements () ) {
	    String name = (String) e.nextElement();
	    if (name == "C") System.err.println("Saw C");
	    if (name == "SP") System.err.println("Saw SP");
	    if (name == "L") System.err.println("Saw L");
	    if (name == "O") System.err.println("Saw O");
	    if (name == "OU") System.err.println("Saw OU");
	    if (name == "CN") System.err.println("Saw CN");
	    if (name == "Email") System.err.println("Saw Email");
	    if (name == "SPKAC") System.err.println("Saw SPKAC");

Could someone please return my sanity.  Thanks.

Scott Jewell
Received on Wednesday, 4 December 1996 15:31:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:21 UTC