snoyberg/http-conduit — pull request #31 by lfairy (2012-06-11 04:31:39+00:00)
Title: Query strings: Don't prepend '?' if it's already there

When you specify a path, http-conduit only prepends a slash to it if there isn't one there already. But when you specify a query string, it adds a `?` regardless of whether there's one already there or not. I don't like this, since it is inconsistent and isn't stated anywhere in the documentation.

This also caused a regression with my last pull request, since the old code discards the `?` while the new code keeps it (as per Network.URI). So we end up with duplicated `?` characters in the request. Sorry about that.

My patch makes the behavior of query strings consistent with that of paths, where the `?` is only added if not present. It fixes the regression as well.