Skip to content

Commit 18caa63

Browse files
committed
v6.0.4012
1 parent c5c11a8 commit 18caa63

File tree

97 files changed

+538
-459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+538
-459
lines changed

CS/CalDAVServer.FileSystemStorage.AspNet/CalDAVServer.FileSystemStorage.AspNet.csproj

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProductVersion>9.0.30729</ProductVersion>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<ProjectGuid>8CCE9862-03D8-4AE2-8613-61C0DC2B892E</ProjectGuid>
9+
<ProjectGuid>AE67877D-DA4F-4825-ACBC-CCD3C2912B71</ProjectGuid>
1010
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
1111
<OutputType>Library</OutputType>
1212
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -123,10 +123,10 @@
123123
</ItemGroup>
124124
<ItemGroup>
125125
<Reference Include="ITHit.WebDAV.Server">
126-
<HintPath>..\packages\ITHit.WebDAV.Server.6.0.3896-Beta\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
126+
<HintPath>..\packages\ITHit.WebDAV.Server.6.0.4012\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
127127
</Reference>
128128
<Reference Include="ITHit.WebDAV.Server.Web">
129-
<HintPath>..\packages\ITHit.WebDAV.Server.Web.6.0.3896-Beta\lib\net451\ITHit.WebDAV.Server.Web.dll</HintPath>
129+
<HintPath>..\packages\ITHit.WebDAV.Server.Web.6.0.4012\lib\net451\ITHit.WebDAV.Server.Web.dll</HintPath>
130130
</Reference>
131131
</ItemGroup>
132132
<PropertyGroup>
@@ -144,7 +144,7 @@
144144
<AutoAssignPort>True</AutoAssignPort>
145145
<DevelopmentServerPort>9658</DevelopmentServerPort>
146146
<DevelopmentServerVPath>/</DevelopmentServerVPath>
147-
<IISUrl>http://localhost:8194/</IISUrl>
147+
<IISUrl>http://localhost:1897/</IISUrl>
148148
<NTLMAuthentication>True</NTLMAuthentication>
149149
<UseCustomServer>False</UseCustomServer>
150150
<CustomServerUrl>
@@ -154,15 +154,6 @@
154154
</FlavorProperties>
155155
</VisualStudio>
156156
</ProjectExtensions>
157-
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
158-
<Exec Command="&quot;$(DevEnvDir)..\..\Web\External\npm.cmd&quot; install webdav.client --prefix wwwroot/js" ContinueOnError="true" StdOutEncoding="utf-8">
159-
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
160-
</Exec>
161-
<Exec Command="npm install webdav.client --prefix wwwroot/js" ContinueOnError="true" Condition="'$(ErrorCode)' == '127' OR '$(ErrorCode)' == '3'" StdOutEncoding="utf-8">
162-
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
163-
</Exec>
164-
<Error Text="Node.js Package Manager (NPM) is required to download IT Hit WebDAV Ajax Library package. Install NPM from https://npmjs.com and run build again." Condition="'$(ErrorCode)' == '127' OR '$(ErrorCode)' == '9009'" />
165-
</Target>
166157
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
167158
Other similar extension points exist, see Microsoft.Common.targets.
168159
<Target Name="BeforeBuild">

CS/CalDAVServer.FileSystemStorage.AspNet/MyCustomGetHandler.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public async Task ProcessRequestAsync(DavContextBaseAsync context, IHierarchyIte
106106
}
107107
else if (context.Request.RawUrl.StartsWith("/AjaxFileBrowser/") || context.Request.RawUrl.StartsWith("/wwwroot/"))
108108
{
109-
// The "/AjaxFileBrowser/" is not a WebDAV folder. It can be used to store client script files,
109+
// The "/AjaxFileBrowser/" and "/wwwroot/" are not a WebDAV folders. They can be used to store client script files,
110110
// images, static HTML files or any other files that does not require access via WebDAV.
111-
// Any request to the files in this folder will just serve them to client.
111+
// Any request to the files in this folder will just serve them to the client.
112112

113113
await context.EnsureBeforeResponseWasCalledAsync();
114114
string filePath = Path.Combine(htmlPath, context.Request.RawUrl.TrimStart('/').Replace('/', Path.DirectorySeparatorChar));
@@ -139,17 +139,16 @@ public async Task ProcessRequestAsync(DavContextBaseAsync context, IHierarchyIte
139139

140140
/// <summary>
141141
/// Writes HTML to the output stream in case of GET request using encoding specified in Engine.
142-
/// Writes headers only in caes of HEAD request.
142+
/// Writes headers only in case of HEAD request.
143143
/// </summary>
144144
/// <param name="context">Instace of <see cref="DavContextBaseAsync"/>.</param>
145145
/// <param name="content">String representation of the content to write.</param>
146146
/// <param name="filePath">Relative file path, which holds the content.</param>
147147
private async Task WriteFileContentAsync(DavContextBaseAsync context, string content, string filePath)
148148
{
149-
string contentType = null;
150149
Encoding encoding = context.Engine.ContentEncoding; // UTF-8 by default
151-
context.Response.ContentLength = encoding.GetByteCount(content);
152-
context.Response.ContentType = $"{MimeMapping.GetMimeMapping(filePath)}; charset={encoding.WebName}";
150+
context.Response.ContentLength = encoding.GetByteCount(content);
151+
context.Response.ContentType = $"{MimeType.GetMimeType(Path.GetExtension(filePath)) ?? "application/octet-stream"}; charset={encoding.WebName}";
153152

154153
// Return file content in case of GET request, in case of HEAD just return headers.
155154
if (context.Request.HttpMethod == "GET")

CS/CalDAVServer.FileSystemStorage.AspNet/MyCustomHandlerPage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ void Page_LoadAsync(object sender, EventArgs e)
2525
{
2626
RegisterAsyncTask(new PageAsyncTask(GetPageDataAsync));
2727
}
28+
2829
public async Task GetPageDataAsync()
2930
{
3031
DavContext context = new DavContext(HttpContext.Current);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="ITHit.WebDAV.Server" version="6.0.3896-Beta" targetFramework="net451" />
4-
<package id="ITHit.WebDAV.Server.Web" version="6.0.3896-Beta" targetFramework="net451" />
3+
<package id="ITHit.WebDAV.Server" version="6.0.4012" targetFramework="net451" />
4+
<package id="ITHit.WebDAV.Server.Web" version="6.0.4012" targetFramework="net451" />
55
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net451" />
66
</packages>
0 Bytes
Binary file not shown.
Binary file not shown.

CS/CalDAVServer.SqlStorage.AspNet/CalDAVServer.SqlStorage.AspNet.csproj

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProductVersion>9.0.30729</ProductVersion>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<ProjectGuid>FCCA8D8C-1064-49E8-AA1B-5F4692A45366</ProjectGuid>
9+
<ProjectGuid>296C9BC7-42C3-4768-913B-FF439FB456B9</ProjectGuid>
1010
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
1111
<OutputType>Library</OutputType>
1212
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -111,10 +111,10 @@
111111
</ItemGroup>
112112
<ItemGroup>
113113
<Reference Include="ITHit.WebDAV.Server">
114-
<HintPath>..\packages\ITHit.WebDAV.Server.6.0.3896-Beta\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
114+
<HintPath>..\packages\ITHit.WebDAV.Server.6.0.4012\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
115115
</Reference>
116116
<Reference Include="ITHit.WebDAV.Server.Web">
117-
<HintPath>..\packages\ITHit.WebDAV.Server.Web.6.0.3896-Beta\lib\net451\ITHit.WebDAV.Server.Web.dll</HintPath>
117+
<HintPath>..\packages\ITHit.WebDAV.Server.Web.6.0.4012\lib\net451\ITHit.WebDAV.Server.Web.dll</HintPath>
118118
</Reference>
119119
</ItemGroup>
120120
<PropertyGroup>
@@ -132,7 +132,7 @@
132132
<AutoAssignPort>True</AutoAssignPort>
133133
<DevelopmentServerPort>9658</DevelopmentServerPort>
134134
<DevelopmentServerVPath>/</DevelopmentServerVPath>
135-
<IISUrl>http://localhost:28134/</IISUrl>
135+
<IISUrl>http://localhost:17482/</IISUrl>
136136
<NTLMAuthentication>False</NTLMAuthentication>
137137
<UseCustomServer>False</UseCustomServer>
138138
<CustomServerUrl>
@@ -142,15 +142,6 @@
142142
</FlavorProperties>
143143
</VisualStudio>
144144
</ProjectExtensions>
145-
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
146-
<Exec Command="&quot;$(DevEnvDir)..\..\Web\External\npm.cmd&quot; install webdav.client --prefix wwwroot/js" ContinueOnError="true" StdOutEncoding="utf-8">
147-
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
148-
</Exec>
149-
<Exec Command="npm install webdav.client --prefix wwwroot/js" ContinueOnError="true" Condition="'$(ErrorCode)' == '127' OR '$(ErrorCode)' == '3'" StdOutEncoding="utf-8">
150-
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
151-
</Exec>
152-
<Error Text="Node.js Package Manager (NPM) is required to download IT Hit WebDAV Ajax Library package. Install NPM from https://npmjs.com and run build again." Condition="'$(ErrorCode)' == '127' OR '$(ErrorCode)' == '9009'" />
153-
</Target>
154145
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
155146
Other similar extension points exist, see Microsoft.Common.targets.
156147
<Target Name="BeforeBuild">

CS/CalDAVServer.SqlStorage.AspNet/MyCustomGetHandler.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public async Task ProcessRequestAsync(DavContextBaseAsync context, IHierarchyIte
106106
}
107107
else if (context.Request.RawUrl.StartsWith("/AjaxFileBrowser/") || context.Request.RawUrl.StartsWith("/wwwroot/"))
108108
{
109-
// The "/AjaxFileBrowser/" is not a WebDAV folder. It can be used to store client script files,
109+
// The "/AjaxFileBrowser/" and "/wwwroot/" are not a WebDAV folders. They can be used to store client script files,
110110
// images, static HTML files or any other files that does not require access via WebDAV.
111-
// Any request to the files in this folder will just serve them to client.
111+
// Any request to the files in this folder will just serve them to the client.
112112

113113
await context.EnsureBeforeResponseWasCalledAsync();
114114
string filePath = Path.Combine(htmlPath, context.Request.RawUrl.TrimStart('/').Replace('/', Path.DirectorySeparatorChar));
@@ -139,17 +139,16 @@ public async Task ProcessRequestAsync(DavContextBaseAsync context, IHierarchyIte
139139

140140
/// <summary>
141141
/// Writes HTML to the output stream in case of GET request using encoding specified in Engine.
142-
/// Writes headers only in caes of HEAD request.
142+
/// Writes headers only in case of HEAD request.
143143
/// </summary>
144144
/// <param name="context">Instace of <see cref="DavContextBaseAsync"/>.</param>
145145
/// <param name="content">String representation of the content to write.</param>
146146
/// <param name="filePath">Relative file path, which holds the content.</param>
147147
private async Task WriteFileContentAsync(DavContextBaseAsync context, string content, string filePath)
148148
{
149-
string contentType = null;
150149
Encoding encoding = context.Engine.ContentEncoding; // UTF-8 by default
151-
context.Response.ContentLength = encoding.GetByteCount(content);
152-
context.Response.ContentType = $"{MimeMapping.GetMimeMapping(filePath)}; charset={encoding.WebName}";
150+
context.Response.ContentLength = encoding.GetByteCount(content);
151+
context.Response.ContentType = $"{MimeType.GetMimeType(Path.GetExtension(filePath)) ?? "application/octet-stream"}; charset={encoding.WebName}";
153152

154153
// Return file content in case of GET request, in case of HEAD just return headers.
155154
if (context.Request.HttpMethod == "GET")

CS/CalDAVServer.SqlStorage.AspNet/MyCustomHandlerPage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ void Page_LoadAsync(object sender, EventArgs e)
2525
{
2626
RegisterAsyncTask(new PageAsyncTask(GetPageDataAsync));
2727
}
28+
2829
public async Task GetPageDataAsync()
2930
{
3031
using (DavContext context = new DavContext(HttpContext.Current))
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="ITHit.WebDAV.Server" version="6.0.3896-Beta" targetFramework="net451" />
4-
<package id="ITHit.WebDAV.Server.Web" version="6.0.3896-Beta" targetFramework="net451" />
3+
<package id="ITHit.WebDAV.Server" version="6.0.4012" targetFramework="net451" />
4+
<package id="ITHit.WebDAV.Server.Web" version="6.0.4012" targetFramework="net451" />
55
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net451" />
66
</packages>

0 commit comments

Comments
 (0)