httplistener parsequerystring; array elements with commas
<p>I'm trying to use HttpUtility.ParseQueryString to parse an array from a post query string.  The resulting string that it produces is <code>x,x,4</code>.  The real array is <code>hosts[] = "x", hosts[]="x,4"</code>.
So it's fooling my program into thinking that it's an array element.</p>

<p>The post input is: <code>"hosts%5B%5D=x&amp;hosts%5B%5D=x%2C4"</code><br>
As you would expect, <code>%2C</code> is the encoding for a comma and the ampersand is the delimiter for an element of the array. Surprising thing is, adding an element of <code>x&amp;4</code> does not make the world implode upon itself. It is properly escaped to <code>&amp;amp;amp;</code></p>

<pre><code>private void PopulatePost()
{
  if (_ctx.Request.HttpMethod != "POST" || _ctx.Request.ContentType == null)
    return;
  var post_string = new StreamReader(_ctx.Request.InputStream,
                        _ctx.Request.ContentEncoding).ReadToEnd();

  if (_ctx.Request.ContentType.StartsWith("multipart/form-data"))
    PopulatePostMultiPart(post_string);
  else
    Post = HttpUtility.ParseQueryString(post_string,
                                        _ctx.Request.ContentEncoding);
}
</code></pre>
