Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GZIP bug #3

Merged
merged 2 commits into from
Jun 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions csharp/ExecuteFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class ExecuteFunction
{
private const string DEV_SECRET_KEY = "PLAYFAB_DEV_SECRET_KEY";
private const string TITLE_ID = "PLAYFAB_TITLE_ID";
private const string CLOUD_NAME = "PLAYFAB_CLOUD_NAME";
private const string VERTICAL_NAME = "PLAYFAB_VERTICAL_NAME";
private static readonly HttpClient httpClient = new HttpClient();
/// <summary>
/// A local implementation of the ExecuteFunction feature. Provides the ability to execute an Azure Function with a local URL with respect to the host
Expand Down Expand Up @@ -225,7 +225,7 @@ private static string GetServerApiUri(string endpoint)
sb.Append(title).Append(".");
}
// Append the vertical name if applicable
string vertical = Environment.GetEnvironmentVariable(CLOUD_NAME, EnvironmentVariableTarget.Process);
string vertical = Environment.GetEnvironmentVariable(VERTICAL_NAME, EnvironmentVariableTarget.Process);
if (!string.IsNullOrEmpty(vertical))
{
sb.Append(vertical).Append(".");
Expand Down Expand Up @@ -370,6 +370,7 @@ private static byte[] CompressResponseBody(object responseObject, HttpRequest re

private static byte[] StreamToBytes(Stream input)
{
input.Seek(0, SeekOrigin.Begin);
byte[] buffer = new byte[4*1024];
using (var output = new MemoryStream())
{
Expand Down