1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

[sever] Update GlidingSquirrel t v0.6.1

This commit is contained in:
Starbeamrainbowlabs 2017-12-25 18:06:50 +00:00
parent 6b359739d2
commit 668f5be2f7
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 20 additions and 9 deletions

View file

@ -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 @@
<MonoDevelop>
<Properties>
<Policies>
<DotNetNamingPolicy ResourceNamePolicy="FileFormatDefault" DirectoryNamespaceAssociation="PrefixedHierarchical" />
<DotNetNamingPolicy ResourceNamePolicy="FileFormatDefault" DirectoryNamespaceAssociation="PrefixedHierarchical">
<inheritsSet />
<inheritsScope />
</DotNetNamingPolicy>
</Policies>
</Properties>
</MonoDevelop>

View file

@ -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
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
await response.SetBody(settingsJson);
Log.WriteLine("[Http/ClientSettings] Sent settings to {0}", request.ClientAddress);
return;
return HttpConnectionAction.Continue;
}
@ -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
Log.WriteLine(error.ToString());
}
logRequest(request, response);
return HttpConnectionAction.Continue;
}
#region Interface Methods
@ -202,6 +204,12 @@ namespace Nibriboard
);
}
public override bool ShouldAcceptConnection(HttpRequest connectionRequest, HttpResponse connectionResponse)
{
// TODO: Implement support for user accounts here
return true;
}
#endregion
}
}

View file

@ -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" />