0

メソッドが PLAY_FLASH や PLAY_SESSION などの特定の Cookie を変更しないようにしたい (なぜですか?バグ 785のため)。

私はこれを試しました:

// This method should never modify any PLAY cookie.
public static void doNothingPost() throws InterruptedException {
    logger.info("Done nothing");

    response.cookies.remove("PLAY_FLASH");
    response.cookies.remove("PLAY_ERRORS");
    response.cookies.remove("PLAY_SESSION");

    ok();
}

さて、respone.cookies.remove()Cookie (有効期限が過ぎた SetCookie) を積極的に削除することがわかりました。特定の Cookie の SetCookie ヘッダーを送信しないように play に指示するにはどうすればよいですか? (それとも全部?)

4

1 に答える 1

0
  • t0->setSessionを呼び出す
  • t5->doNothingを呼び出す
  • t10->setSessionは
  • t15->doNothingは戻ります

    public static void setSession(String uuid){
        Cache.add(uuid, "guven");
        response.setCookie("username", "guven");
        await(1000);
        ok();
    }
    
    public static void doNothing(String sameUUIDWithSetSessionParameter){
        String username = Cache.get(sameUUIDWithSetSessionParameter, String.class);
        Cache.delete(sameUUIDWithSetSessionParameter);
        Logger.info("dn: " + username);
        await(1000);
        ok();
    }
    

これらの連続するajax呼び出しに異なるセッションIDがない場合は、uuidパラメーターを忘れて、session.getId()から値を取得するために使用します。Cache

于 2013-02-08T03:24:58.887 に答える