[Libreoffice-commits] online.git: loolwsd/discovery.xml loolwsd/LOOLWSD.cpp
Henry Castro
hcastro at collabora.com
Tue Mar 15 23:16:19 UTC 2016
loolwsd/LOOLWSD.cpp | 4 +++-
loolwsd/discovery.xml | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit bda64dbf2bef7efebceda9bdd6a1395b2b49879a
Author: Henry Castro <hcastro at collabora.com>
Date: Tue Mar 15 19:13:23 2016 -0400
loolwsd: fix get host from request
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index fcb7da6..499391b 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -633,11 +633,13 @@ private:
{
DOMParser parser;
DOMWriter writer;
+ URI uri("http", request.getHost(), request.getURI());
+
const std::string discoveryPath = Path(Application::instance().commandPath()).parent().toString() + "discovery.xml";
const std::string mediaType = "text/xml";
const std::string action = "action";
const std::string urlsrc = "urlsrc";
- const std::string uriValue = "http://" + request.getHost() + LOLEAFLET_PATH;
+ const std::string uriValue = "http://" + uri.getHost() + LOLEAFLET_PATH;
InputSource inputSrc(discoveryPath);
AutoPtr<Poco::XML::Document> docXML = parser.parse(&inputSrc);
diff --git a/loolwsd/discovery.xml b/loolwsd/discovery.xml
index ac78c20..8eabc7a 100755
--- a/loolwsd/discovery.xml
+++ b/loolwsd/discovery.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<wopi-discovery>
<net-zone name="external-http">
- <app name=" ">
+ <app name="application/vnd.oasis.opendocument.text">
<action name="edit" ext="odt"/>
</app>
<app name="application/vnd.oasis.opendocument.presentation">
More information about the Libreoffice-commits
mailing list