èner: Die-Staemme.de; ungültiger cookie?

Beitrag lesen

Hallo,
Ich versuche mich momentan mit einem Java-Programm in ein Browsergame einzuloggen. Dazu hab ich einen HTTPClient heruntergeladen.
Bei manchen Seiten klappt der Login wunderbar, bei anderen, wie z.B. die-staemme.de klappt es nicht, denn es kommt folgende Fehlermeldung:
java.net.ProtocolException: Bad Set-Cookie header: server_id=de32; expires=Thu, 13-Nov-2008 19:20:12 GMT; httponly, user=******; expires=Wed, 14-Oct-2009 19:20:12 GMT; httponly, password=******; expires=Wed, 14-Oct-2009 19:20:12 GMT; httponly
No '=' found for token starting at position 216

Was genau möchte mir diese Fehlermeldung sagen, und wie kann ich sie umgehen? Ist der Cookie etwa nicht gültig - und warum haben dann die Webbrowser kein Problem damit? Mein Code (Benutzername und Passwort durch ** ersetzt):

package de.aypac.staemme;  
  
import java.io.IOException;  
import java.io.InputStream;  
import java.net.CookieHandler;  
import java.net.CookieManager;  
  
import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;  
  
import com.sun.xml.internal.ws.transport.http.client.CookieJar;  
  
import HTTPClient.*;  
import HTTPClient.http.Handler;  
  
  
public class Screen {  
 private static String password = "*****";  
 private static String name = "******";  
  
  
 private static int welt = 32;  
// --  
 private static NVPair form_data[] = new NVPair[5];  
 static HTTPConnection con = null;  
 static HTTPConnection con2 = null;  
// -----  
 final static String URL = "www.die-staemme.de";  
 final static String URL2 = "de32.die-staemme.de";  
 final static String LOGIN_URL = "index.php?action=login";  
 final static String LOGOUT_URL = "game.php?&action=logout&h=7f5f";  
 final static String FORUM_URL = "game.php";  
  
  
  
  
 public static void main(String[] args) {  
  
  form_data[0] = new NVPair("user", name);  
  form_data[1] = new NVPair("password", password);  
  form_data[2] = new NVPair("server", "de" + welt);  
  form_data[3] = new NVPair("clear", "true");  
  form_data[4] = new NVPair("cookie", "true");  
  
  
  try {  
   con = new HTTPConnection(URL);  
  }  
  catch (Exception ioe) {  
   System.err.println(URL + " -> is not reachable! Try to deactivate your firewall(s).");  
  }  
  
//  CookieModule.discardAllCookies();  
  
        for (Cookie c : CookieModule.listAllCookies()) {  
            System.out.println("Cookies vorher : " + c.getName() + " \t" + c.getValue() + " \t" + c.getDomain());  
        }  
  
  CookieModule.setCookiePolicyHandler(null);  
  
  
  try {  
   HTTPResponse   rsp = con.Post(LOGIN_URL, form_data);  
   if (rsp.getStatusCode() >= 300){  
    System.err.println("Received Error: "+rsp.getReasonLine());  
   }  
   else {  
    System.out.println(rsp.getText());  
   }  
  }  
  catch (Exception e) {  
   System.err.println(e.toString());  
  }  
  
  
        for (Cookie c : CookieModule.listAllCookies()) {  
            System.out.println("Cookies nachher : " + c.getName() + " \t" + c.getValue() + " \t" + c.getDomain());  
        }  
  
  
  
  try {  
   HTTPResponse   rsp = con.Get(FORUM_URL);  
   if (rsp.getStatusCode() >= 300) {  
       System.err.println("Received Error: "+rsp.getReasonLine());  
       System.err.println(rsp.getText());  
   }  
   else {  
    System.out.println("\n\nLOGOUT:");  
    System.out.println("Site:\n " + rsp.getText());  
   }  
  }  
     catch (Exception ioe) {  
      System.err.println(ioe.toString());  
     }  
     con.stop();  
 }  
  
}