Moradnejad
Moradnejad

Reputation: 3653

What are the allowed ASCII characters via POST in HTTP requests?

What ASCII characters are not allowed in HTTP requests (particularly via POST and application/x-www-form-urlencoded)? (one is '+')

Upvotes: 1

Views: 3195

Answers (1)

ben720
ben720

Reputation: 76

If the form is encoded with application/x-www-url-encoded, which is the default for HTML forms, the only characters you can definitely use are:

  • 0-9
  • a-z
  • A-Z
  • $ - _ . ! * ' ( ) , "

    "+" means space. Everything else can have a special meaning.

    If you are using multipart/form-data, then you can send anything anyhow. If you are using an HTML form, add the enctype property, like so:
<form method="post" enctype="multipart/form-data">

Upvotes: 6

Related Questions