Web Tool Bag  
Home · Articles · Downloads · Discussion Forum · Web Links · News Categories · Synonyms DatabaseOctober 17 2017 19:36:36
Navigation
Home
Articles
Downloads
Discussion Forum
Web Links
News Categories
Synonyms Database
Search
Users Online
Guests Online: 1
No Members Online

Registered Members: 856
Unactivated Members: 118
Newest Member: lakim
Forum Threads
Newest Threads
Uncaught Error: _reg...
Module build failed:...
Installation
mochi script questions
Redirect with captch...
Hottest Threads
Installation [12]
Any questions and... [5]
Captcha picture d... [4]
Integrate with Vi... [4]
Mods: Sucess/Than... [4]
 
Latest Articles
PHP Fatal error: Ca...
Mouse pointer disapp...
UBUNTU install via U...
Geany tried to acces...
How to create MySql ...
Form data encoding Browsers roundup

In an HTML form element, the enctype attribute specifies how the data will be encoded when it is POSTed to the web server. Traditionally, there are two accepted content types for HTML forms:

  • application/x-www-form-urlencoded (the default value)
  • multipart/form-data

But there is nothing to stop someone from specifying whatever enctype value that they want (e.g., "application/x-foo"). Of course specifying your own random value doesn't mean that the browser will understand how to submit it or the web server will understand how to process it.

The following lists how some popular browsers respond to unexpected but technically valid enctype values. Each of the MIME types from this list was tested. The following browsers were tested:

  • Safari - Mac OS X
  • Safari - Windows
  • Konqueror - Linux
  • Mozilla Firefox - Mac OS X
  • Mozilla Firefox - Windows
  • Mozilla Firefox - Linux
  • Opera - Mac OS X
  • Opera - Windows
  • Opera - Linux
  • Internet Explorer 7 - Windows
  • Internet Explorer 6 - Windows
  • Internet Explorer 5 - Mac OS X

Go straight to the conclusions. Or, try some samples yourself.

Safari - Mac OS X

Version Tested: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/419.3 (KHTML, like Gecko) Safari/419.3

Safari submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data contains the word multipartmultipart/form-datamultipart/example contains the word form-datamultipart/form-dataexample/form-data contains the word texttext/plain (content-type specifies nonexistent MIME boundary and posted data is urlencoded)text/example contains the word plaintext/plain (content-type specifies nonexistent MIME boundary and posted data is urlencoded)example/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Safari - Windows

Version Tested: Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/522.15.5 (KHTML, like Gecko) Version/3.0.3 Safari/522.15.5

Safari submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data contains the word multipartmultipart/form-datamultipart/example contains the word form-datamultipart/form-dataexample/form-data contains the word texttext/plain (content-type specifies empty MIME boundary and posted data is urlencoded)text/example contains the word plaintext/plain (content-type specifies empty MIME boundary and posted data is urlencoded)example/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Konqueror - Linux

Version Tested: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko)

Konqueror submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data contains the word multipartmultipart/form-datamultipart/example contains the word form-datamultipart/form-dataexample/form-data contains the word texttext/plain (content-type specifies nonexistent MIME boundary and posted data is urlencoded)text/example contains the word plaintext/plain (content-type specifies nonexistent MIME boundary and posted data is urlencoded)example/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Mozilla Firefox - Mac OS X

Version Tested: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7

Opera submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Mozilla Firefox - Windows

Version Tested: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7

Opera submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Mozilla Firefox - Linux

Version Tested: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7

Opera submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Opera - Mac OS X

Version Tested: Opera/9.23 (Macintosh; PPC Mac OS X; U; en)

Opera submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Opera - Windows

Version Tested: Opera/9.23 (Windows NT 5.1; U; en)

Opera submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Opera - Linux

Version Tested: Opera/9.23 (X11; Linux i686; U; en)

Opera submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Internet Explorer 7 - Windows

Version Tested: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322)

IE submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Internet Explorer 6 - Windows

Version Tested: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

IE submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data text/plaintext/plaintext/plain anything elseapplication/x-www-form-urlencodedexample/example
top

Internet Explorer 5 - Mac OS X

Version Tested:

IE submits the following content types:

  • application/x-www-form-urlencoded
  • multipart/form-data

The following rules are applied based on the value of enctype:

Specified enctypeSubmitted Content-TypeSample (omitted)application/x-www-form-urlencoded(omitted) application/x-www-form-urlencodedapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded multipart/form-datamultipart/form-datamultipart/form-data anything elseapplication/x-www-form-urlencodedexample/example

Posted by admin on January 13 2010 11:53:53 3381 Reads · Print
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Member Poll
Which PHP framework do you preffer?

Symfony

Zend

CodeIgniter

PHP on TRAX

eZ Components

Fusebox

PhpOpenbiz

Prado

QPHP

Seagull

You must login to vote.
Shoutbox
You must login to post a message.

Vince
03/10/2011 21:17
Hi, How to remove Register from Login screen? I don't want them to register and have full access! if you leave register then they should not have any rights until the admin assigns them

webtoolz
26/09/2011 11:28
Please describe your problem with more details. Thank you.

bimmer98
22/11/2010 20:31
Help. There was a problem with the request; error regarding feedbackzdr form program

Copyright © 2017 - www.webtoolbag.com