Skip to content

Commit

Permalink
Be consistent about method="POST" attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
aantron committed Feb 11, 2022
1 parent 9bec26f commit cc10603
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/d-form/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ a CSRF token into it using the
generate the `<input>` tag.

```html
<form method="post" action="/">
<form method="POST" action="/">
<input name="dream.csrf" type="hidden" value="j8vjZ6...">

<!-- The rest we actually wrote ourselves in the template! -->
Expand Down
2 changes: 1 addition & 1 deletion example/w-upload-stream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the total size of each uploaded file:
let home request =
<html>
<body>
<form action="/" enctype="multipart/form-data" method="post">
<form method="POST" action="/" enctype="multipart/form-data">
<%s! Dream.csrf_tag request %>
<input name="files" type="file" multiple>
<button>Submit!</button>
Expand Down
2 changes: 1 addition & 1 deletion example/w-upload-stream/upload_stream.eml.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let home request =
<html>
<body>
<form action="/" enctype="multipart/form-data" method="post">
<form method="POST" action="/" enctype="multipart/form-data">
<%s! Dream.csrf_tag request %>
<input name="files" type="file" multiple>
<button>Submit!</button>
Expand Down
8 changes: 4 additions & 4 deletions src/dream.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ val origin_referrer_check : middleware
with a CSRF token:
{[
<form action="/" method="post">
<form method="POST" action="/">
<%s! Dream.csrf_tag request %>
<input name="my.field">
</form>
Expand Down Expand Up @@ -1137,7 +1137,7 @@ val multipart : ?csrf:bool -> request -> multipart_form form_result promise
[multipart/form-data]. The CSRF token can be generated in a template with
{[
<form action="/" method="post" enctype="multipart/form-data">
<form method="POST" action="/" enctype="multipart/form-data">
<%s! Dream.csrf_tag request %>
]}
Expand Down Expand Up @@ -1320,7 +1320,7 @@ val csrf_tag : request -> string
{!Dream.val-form} and {!Dream.val-multipart}. For example, in a template,
{[
<form method="post" action="/">
<form method="POST" action="/">
<%s! Dream.csrf_tag request %>
<input name="my.field">
</form>
Expand All @@ -1329,7 +1329,7 @@ val csrf_tag : request -> string
expands to
{[
<form method="post" action="/">
<form method="POST" action="/">
<input name="dream.csrf" type="hidden" value="a-token">
<input name="my.field">
</form>
Expand Down

0 comments on commit cc10603

Please sign in to comment.