rest-driver/rest-driver — pull request #122 by joelittlejohn (2012-08-16 09:48:51+00:00)
Title: Fix parsing of request Content Types that include a charset

In rest-server-driver 1.1.24 it's no longer possible to set a request content type that includes a charset, like:

```java
put( url, body(bodyText, "text/plain; charset=utf-8"))
```

The above code produces an IllegalArgumentException with the message "MIME type may not contain reserved characters".

This patch fixes the problem by parsing the supplied content type before supplying both the base type and a charset to `org.apache.http.entity.ContentType#create`.

One (nice) side-effect of this patch is that content types must now be valid - it's no longer possible to use a content type like:

`mytype`

Since this isn't valid (it has no subtype) it causes an IllegalArgumentException.