Skip to content

Commit bae2f96

Browse files
committed
Merge branch 'master' of https://github.com/twilio/twilio-csharp into alpha
2 parents 6779c57 + 516aec1 commit bae2f96

File tree

9 files changed

+309
-251
lines changed

9 files changed

+309
-251
lines changed

CHANGES.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
twilio-csharp Changelog
22
=======================
33

4-
[2017-02-09] Version 5.0.0
4+
5+
[2017-02-24] Version 5.0.2-alpha1
6+
--------------------------
7+
- URL encode all parameters
8+
- Remove erroneous JWT header in .NET 3.5
9+
10+
11+
[2017-02-21] Version 5.0.1-alpha1
512
--------------------------
613
**New Major Version**
714

src/Twilio/Http/Request.cs

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using System.Text;
4+
using System.Text;
55
using Twilio.Rest;
66

7+
#if !NET35
8+
using System.Net;
9+
#else
10+
using System.Web;
11+
#endif
12+
713
namespace Twilio.Http
814
{
915
/// <summary>
@@ -116,9 +122,13 @@ private static string EncodeParameters(IEnumerable<KeyValuePair<string, string>>
116122
else
117123
{
118124
result += "&";
119-
}
120-
121-
result += pair.Key + "=" + pair.Value;
125+
}
126+
127+
#if !NET35
128+
result += WebUtility.UrlEncode(pair.Key) + "=" + WebUtility.UrlEncode(pair.Value);
129+
#else
130+
result += HttpUtility.UrlEncode(pair.Key) + "=" + HttpUtility.UrlEncode(pair.Value);
131+
#endif
122132
}
123133

124134
return result;

src/Twilio/JWT/BaseJwt.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private string BuildToken(JwtHeader headers, JwtPayload payload)
127127
#else
128128
private Dictionary<string, object> BuildHeaders()
129129
{
130-
return new Dictionary<string, object> { { "typ", "JWT" } };
130+
return new Dictionary<string, object>();
131131
}
132132

133133
private Dictionary<string, object> BuildPayload()

src/Twilio/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
internal class AssemblyInfomation
1616
{
17-
public const string AssemblyInformationalVersion = "5.0.1-alpha1";
17+
public const string AssemblyInformationalVersion = "5.0.2-alpha1";
1818
}

src/Twilio/Twilio.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Copyright>Copyright © Twilio</Copyright>
88
<AssemblyTitle>Twilio</AssemblyTitle>
99
<NeutralLanguage>en-US</NeutralLanguage>
10-
<VersionPrefix>5.0.1</VersionPrefix>
10+
<VersionPrefix>5.0.2</VersionPrefix>
1111
<VersionSuffix>alpha1</VersionSuffix>
1212
<Authors>Twilio</Authors>
1313
<NoWarn>$(NoWarn);CS1591</NoWarn>

0 commit comments

Comments
 (0)