Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up
ごっそり書き直しました 問題 net/httpのDo,Get,Post,PostFormは301,302とかが帰ってくると自動的にリダイレクトしてくれるんだけど Set-Cookieを読み捨ててしまう 再現 package main import ( "fmt" "net/http" "time" ) func redirectHandler(w http.ResponseWriter, r *http.Request){ name := r.PostFormValue("name") if name == "" { fmt.Fprint(w, "nameが設定されていません") } else { cookie := http.Cookie { Name : "name", Value : name, Expires : time.Now().AddDate(0, 0, 1), } htt
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く