1
0
Fork 0

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

View File

@ -75,7 +75,7 @@ namespace Nibriboard
return Task.CompletedTask; 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) if(request.Method != HttpMethod.GET)
{ {
@ -83,7 +83,7 @@ namespace Nibriboard
response.ContentType = "text/plain"; response.ContentType = "text/plain";
await response.SetBody("Error: That method isn't supported yet."); await response.SetBody("Error: That method isn't supported yet.");
logRequest(request, response); logRequest(request, response);
return; return HttpConnectionAction.Continue;
} }
if(request.Url == "/Settings.json") if(request.Url == "/Settings.json")
@ -95,7 +95,7 @@ namespace Nibriboard
await response.SetBody(settingsJson); await response.SetBody(settingsJson);
Log.WriteLine("[Http/ClientSettings] Sent settings to {0}", request.ClientAddress); Log.WriteLine("[Http/ClientSettings] Sent settings to {0}", request.ClientAddress);
return; return HttpConnectionAction.Continue;
} }
@ -110,7 +110,7 @@ namespace Nibriboard
response.ContentType = "text/plain"; response.ContentType = "text/plain";
await response.SetBody($"Can't find '{expandedFilePath}'."); await response.SetBody($"Can't find '{expandedFilePath}'.");
logRequest(request, response); logRequest(request, response);
return; return HttpConnectionAction.Continue;
} }
response.ContentType = LookupMimeType(expandedFilePath); response.ContentType = LookupMimeType(expandedFilePath);
@ -127,6 +127,8 @@ namespace Nibriboard
Log.WriteLine(error.ToString()); Log.WriteLine(error.ToString());
} }
logRequest(request, response); logRequest(request, response);
return HttpConnectionAction.Continue;
} }
#region Interface Methods #region Interface Methods
@ -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
}
} }

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <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="MimeSharp" version="1.0.0" targetFramework="net45" />
<package id="NCuid" version="1.0.0" targetFramework="net461" /> <package id="NCuid" version="1.0.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" /> <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />