9

Is this a bug in the framework?

I have to use HttpUtility.UrlDecode here. I thought things were automatically decoded in MVC.

    public Thingy[] Get(string id)
    {
        var actualId = HttpUtility.UrlDecode(id ?? string.Empty);

        var result = MakeThingy(actualId );
        return result;
    }

I should be able to just do this ...

    public Thingy[] Get(string id)
    {
        var result = MakeThingy(id ?? string.Empty);
        return result;
    }
Antony Scott
  • 21,690
  • 12
  • 62
  • 94

1 Answers1

11

It's a known bug. We'll fix it for the next release.

marcind
  • 52,944
  • 13
  • 125
  • 111
  • please excuse my ignorance, but are you the PM for ASP.NET-Web-Api? I've noticed you've answered a few of my related question in a very authoritative manner :) – Antony Scott Feb 22 '12 at 22:53
  • 1
    Not the PM, but one of the developers (on both MVC and Web API). I try to make it clear in my SO profile: http://stackoverflow.com/users/358970/marcind – marcind Feb 23 '12 at 00:11