{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-net/issues/189","labels_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/189/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/189/events","html_url":"https://github.com/aws/aws-sdk-net/issues/189","id":64839906,"number":189,"title":"AmazonCloudFrontUrlSigner.BuildPolicyForSignedUrl() method doesn't support not passing DateGreaterThan","user":{"login":"WalkerCodeRanger","id":186398,"avatar_url":"https://avatars.githubusercontent.com/u/186398?v=3","gravatar_id":"","url":"https://api.github.com/users/WalkerCodeRanger","html_url":"https://github.com/WalkerCodeRanger","followers_url":"https://api.github.com/users/WalkerCodeRanger/followers","following_url":"https://api.github.com/users/WalkerCodeRanger/following{/other_user}","gists_url":"https://api.github.com/users/WalkerCodeRanger/gists{/gist_id}","starred_url":"https://api.github.com/users/WalkerCodeRanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalkerCodeRanger/subscriptions","organizations_url":"https://api.github.com/users/WalkerCodeRanger/orgs","repos_url":"https://api.github.com/users/WalkerCodeRanger/repos","events_url":"https://api.github.com/users/WalkerCodeRanger/events{/privacy}","received_events_url":"https://api.github.com/users/WalkerCodeRanger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-27T19:52:57Z","updated_at":"2015-04-01T19:47:41Z","closed_at":null,"body":"The `AmazonCloudFrontUrlSigner.BuildPolicyForSignedUrl(...)` method has code  intended to support not having a DateGreaterThan value (\"`epochDateGreaterThan == null ? \"\" :...`\"). However, this doesn't work becuase the DateTime datatype isn't nullable so `epochDateGreaterThan == null` is always false.\r\n\r\nGiven that you need backward compatibility and likely want to be CLS complaint, I recommend you add an overload without the `DateTime epochDateGreaterThan` parameter.  Note, the `AmazonCloudFrontUrlSigner.GetCustomSignedURL(...)` methods call this one and should be overloaded/changed to match.\r\n\r\nAlso, since wildcards can't be used with canned policies, the `BuildPolicyForSignedUrl` is useful even when you only want to specify resourcePath and epochDateLessThan.  It would be nice to have an overload or default parameters which supports that use case.\r\n\r\nFinally, the `epochDateLessThan == null` check at the beginning of the `BuildPolicyForSignedUrl` method will always be false and so has no effect and can be removed.\r\n"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-net/issues/comments/88609688","html_url":"https://github.com/aws/aws-sdk-net/issues/189#issuecomment-88609688","issue_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/189","id":88609688,"user":{"login":"normj","id":1653751,"avatar_url":"https://avatars.githubusercontent.com/u/1653751?v=3","gravatar_id":"","url":"https://api.github.com/users/normj","html_url":"https://github.com/normj","followers_url":"https://api.github.com/users/normj/followers","following_url":"https://api.github.com/users/normj/following{/other_user}","gists_url":"https://api.github.com/users/normj/gists{/gist_id}","starred_url":"https://api.github.com/users/normj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normj/subscriptions","organizations_url":"https://api.github.com/users/normj/orgs","repos_url":"https://api.github.com/users/normj/repos","events_url":"https://api.github.com/users/normj/events{/privacy}","received_events_url":"https://api.github.com/users/normj/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T19:47:41Z","updated_at":"2015-04-01T19:47:41Z","body":"Switching to nullables would be preferred but a breaking change I don't want to make. We'll be sure the documentation clearly explains the significance using MinValue and MaxValue"}}