BrightcoveOS/.NET-MAPI-Wrapper — Issue #6: BrightcoveMapiWrapper.Api.BrightcoveApi.SearchVideos encodes values incorrectly
Author: bhaskarmurthy
Created: 2011-11-18 15:33:10+00:00
State: open

Call stack:

Api.BrightcoveApi.SearchVideos
-> Api.BrightcoveApi.RunQuery
-> Api.Connectors.BrightcoveApiConnecter.GetResponseJson
-> Util.Extensions.CollectionExtensions.ToQueryString

In ToQueryString, each list of params in "all", "any", and "none" are split and encoded using HttpUtility.UrlEncode(s)

Looking at the query string generated from this, a parameter like "tag:tagname" gets encoded to "tag%3Atagname". Sending this query parameter to Brightcove results in no results.

Instead, if we use UrlPathEncode(s), we will correctly encode "tag:tagname" to "tag:tagname" and get results as expected.

I can make this change if that's okay, but not sure about what tests to run to verify it doesn't break any existing behaviour.

Thanks,
Bhaskar