[PATCH libreoffice-3-6] rhbz#961460: Don't needlessly pass URLs through INetURLObjec...
Stephan Bergmann (via Code Review)
gerrit at gerrit.libreoffice.org
Fri May 24 02:02:40 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4021
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/21/4021/1
rhbz#961460: Don't needlessly pass URLs through INetURLObject
The WebDAV UCP uses https/davs URLs that may contain a userinfo (cf. RFC 3986)
part, and INetURLObject does not support that (in accordance with RFCs 2818 and
2616) and thus creates an empty INET_PROT_NOT_VALID INetURLObject for such a
URL, leading to failure when trying to save a document to such a URL.
(Regression introduced with 966d20e35d5a2be2fce6c204af5c156c3ead7063 "CMIS ucp:
write documents back to CMIS server.")
(cherry picked from commit 3f5c45b70864af95a6362acf4684fb57eb85e348)
Conflicts:
sfx2/source/doc/docfile.cxx
Change-Id: Ifd396852b211cab1d29575da7fccb32306479f93
---
M sfx2/source/doc/docfile.cxx
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 6271acd..563d809 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1956,8 +1956,11 @@
}
}
- if ( !sParentUrl.isEmpty() )
- aDest = INetURLObject( sParentUrl );
+ if ( sParentUrl.isEmpty() )
+ aDestURL = aDest.GetMainURL( INetURLObject::NO_DECODE );
+ // adjust to above aDest.removeSegment()
+ else
+ aDestURL = sParentUrl;
// LongName wasn't defined anywhere, only used here... get the Title instead
// as it's less probably empty
@@ -1969,7 +1972,7 @@
try
{
- aTransferContent = ::ucbhelper::Content( aDest.GetMainURL( INetURLObject::NO_DECODE ), xComEnv );
+ aTransferContent = ::ucbhelper::Content( aDestURL, xComEnv );
}
catch (const ::com::sun::star::ucb::ContentCreationException& ex)
{
--
To view, visit https://gerrit.libreoffice.org/4021
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd396852b211cab1d29575da7fccb32306479f93
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Stephan Bergmann <sbergman at redhat.com>
More information about the LibreOffice
mailing list