diff --git a/vibed/web-server.md b/vibed/web-server.md index 7339b60..b3d090c 100644 --- a/vibed/web-server.md +++ b/vibed/web-server.md @@ -86,7 +86,8 @@ class WebService // ヘッダ情報
  • タグをリクエストの // ヘッダのプロパティを調べて生成します string[] headers; - foreach(key, value; req.headers) { + foreach(key, value; + req.headers.byKeyValue()) { headers ~= "
  • %s: %s
  • " .format(key, value); @@ -100,7 +101,7 @@ class WebService %s - }.format(username_, + }.format(username_.value, headers.join("\n")); res.writeBody(contents, @@ -116,7 +117,7 @@ class WebService

    Your name: %s

    - }.format(username_); + }.format(username); res.writeBody(contents, "text/html; charset=UTF-8");