Skip to content

Commit

Permalink
Merge branch 'develop2'
Browse files Browse the repository at this point in the history
  • Loading branch information
yar229 committed Aug 26, 2021
2 parents 939a689 + 37228a1 commit eb23115
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions MailRuCloud/MailRuCloudApi/YaR.Clouds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<TargetFrameworks>$(CommonTargetFrameworks)</TargetFrameworks>
<RootNamespace>YaR.Clouds</RootNamespace>
<AssemblyName>YaR.Clouds</AssemblyName>
<AssemblyVersion>1.13.4.2</AssemblyVersion>
<FileVersion>1.13.4.2</FileVersion>
<AssemblyVersion>1.13.4.3</AssemblyVersion>
<FileVersion>1.13.4.3</FileVersion>
<Version>$(AssemblyVersion)</Version>
<LangVersion>preview</LangVersion>
</PropertyGroup>
Expand Down
11 changes: 6 additions & 5 deletions NWebDav/NWebDav.Server/Helpers/ResponseHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public static async Task SendResponseAsync(this IHttpResponse response, DavStatu
// Set the response
response.SetStatus(statusCode);

// YaR: mono require headers be set before writing to response
// Set content type/length
response.SetHeaderValue("Content-Type", "text/xml; charset=\"utf-8\"");
// Since we has no memory stream, can't get length... but still working
//response.SetHeaderValue("Content-Length", response.Stream.Length.ToString(CultureInfo.InvariantCulture)); // Position.ToString(CultureInfo.InvariantCulture));

// Obtain the result as an XML document
using (var xmlWriter = XmlWriter.Create(response.Stream, new XmlWriterSettings
{
Expand Down Expand Up @@ -102,11 +108,6 @@ public static async Task SendResponseAsync(this IHttpResponse response, DavStatu
xDocument.WriteTo(xmlWriter);
#endif
}

// Set content type/length
response.SetHeaderValue("Content-Type", "text/xml; charset=\"utf-8\"");
// Since we has no memory stream, can't get length... but still working
//response.SetHeaderValue("Content-Length", response.Stream.Length.ToString(CultureInfo.InvariantCulture)); // Position.ToString(CultureInfo.InvariantCulture));
}
}
}
4 changes: 2 additions & 2 deletions WDMRC.Console/WDMRC.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<Copyright>[email protected]</Copyright>
<Description>WebDAV emulator for Cloud.mail.ru</Description>
<PackageId>WebDAVCloudMailRu</PackageId>
<AssemblyVersion>1.13.4.2</AssemblyVersion>
<FileVersion>1.13.4.2</FileVersion>
<AssemblyVersion>1.13.4.3</AssemblyVersion>
<FileVersion>1.13.4.3</FileVersion>
<Version>$(AssemblyVersion)</Version>
<AssemblyName>wdmrc</AssemblyName>
<RootNamespace>YaR.Clouds.Console</RootNamespace>
Expand Down

0 comments on commit eb23115

Please sign in to comment.