ooyala/api-sdks — pull request #5 by JasperTimm (2013-05-22 04:21:27+00:00)
Title: Fix for sending empty or null hmaps in requests in OoyalaAPI.java

Within OoyalaAPI.java, the sendRequest method (line 322), the requestBody arg is first checked to be null or empty for generating the URL (along with the signature), but then is sent to getHttpMethod without this check. Hence if the HashMap is empty or null, you'll get an invalid signature error.

I'd suggest you probably wanted the following then - On line 331

HttpRequestBase method = getHttpMethod(HTTPMethod,url, new StringEntity(JSONValue.toJSONString(requestBody)));

Becomes

HttpRequestBase method = getHttpMethod(HTTPMethod,url, new StringEntity(jsonBody));