ocsigen/js_of_ocaml — pull request #214 by m2ym (2014-08-23 18:21:05+00:00)
Title: Fix overuse of FormData in XmlHttpRequest

Currently, the following code sends a request in `multipart/form-data`,
although the contents is a trivial key-value pair list.

XmlHttpRequest.perform ~post_args:["key", `String "value"] url

This change fixes the behavior so that such requests would be sent in
`application/x-www-form-urlencoded`.

If there is at least a file content in `post_args`, then
`multipart/form-data` will be used as usual.