1
0
Fork 0
Browse Source

[sever] Update GlidingSquirrel t v0.6.1

master
Starbeamrainbowlabs 5 years ago
parent
commit
668f5be2f7
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 7
      Nibriboard/Nibriboard.csproj
  2. 20
      Nibriboard/NibriboardApp.cs
  3. 2
      Nibriboard/packages.config

7
Nibriboard/Nibriboard.csproj

@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="GlidingSquirrel">
<HintPath>..\packages\GlidingSquirrel.0.6.0-alpha\lib\net462\GlidingSquirrel.dll</HintPath>
<HintPath>..\packages\GlidingSquirrel.0.6.1-alpha\lib\net462\GlidingSquirrel.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
@ -179,7 +179,10 @@ @@ -179,7 +179,10 @@
<MonoDevelop>
<Properties>
<Policies>
<DotNetNamingPolicy ResourceNamePolicy="FileFormatDefault" DirectoryNamespaceAssociation="PrefixedHierarchical" />
<DotNetNamingPolicy ResourceNamePolicy="FileFormatDefault" DirectoryNamespaceAssociation="PrefixedHierarchical">
<inheritsSet />
<inheritsScope />
</DotNetNamingPolicy>
</Policies>
</Properties>
</MonoDevelop>

20
Nibriboard/NibriboardApp.cs

@ -75,7 +75,7 @@ namespace Nibriboard @@ -75,7 +75,7 @@ namespace Nibriboard
return Task.CompletedTask;
}
public override async Task HandleHttpRequest(HttpRequest request, HttpResponse response)
public override async Task<HttpConnectionAction> HandleHttpRequest(HttpRequest request, HttpResponse response)
{
if(request.Method != HttpMethod.GET)
{
@ -83,7 +83,7 @@ namespace Nibriboard @@ -83,7 +83,7 @@ namespace Nibriboard
response.ContentType = "text/plain";
await response.SetBody("Error: That method isn't supported yet.");
logRequest(request, response);
return;
return HttpConnectionAction.Continue;
}
if(request.Url == "/Settings.json")
@ -95,7 +95,7 @@ namespace Nibriboard @@ -95,7 +95,7 @@ namespace Nibriboard
await response.SetBody(settingsJson);
Log.WriteLine("[Http/ClientSettings] Sent settings to {0}", request.ClientAddress);
return;
return HttpConnectionAction.Continue;
}
@ -110,7 +110,7 @@ namespace Nibriboard @@ -110,7 +110,7 @@ namespace Nibriboard
response.ContentType = "text/plain";
await response.SetBody($"Can't find '{expandedFilePath}'.");
logRequest(request, response);
return;
return HttpConnectionAction.Continue;
}
response.ContentType = LookupMimeType(expandedFilePath);
@ -127,6 +127,8 @@ namespace Nibriboard @@ -127,6 +127,8 @@ namespace Nibriboard
Log.WriteLine(error.ToString());
}
logRequest(request, response);
return HttpConnectionAction.Continue;
}
#region Interface Methods
@ -202,6 +204,12 @@ namespace Nibriboard @@ -202,6 +204,12 @@ namespace Nibriboard
);
}
#endregion
}
public override bool ShouldAcceptConnection(HttpRequest connectionRequest, HttpResponse connectionResponse)
{
// TODO: Implement support for user accounts here
return true;
}
#endregion
}
}

2
Nibriboard/packages.config

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GlidingSquirrel" version="0.6.0-alpha" targetFramework="net462" />
<package id="GlidingSquirrel" version="0.6.1-alpha" targetFramework="net462" />
<package id="MimeSharp" version="1.0.0" targetFramework="net45" />
<package id="NCuid" version="1.0.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />

Loading…
Cancel
Save