summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-03-01 15:51:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-03-01 17:41:27 +0000
commit96537cd4654df65bcde3f2ccde053800210a9d33 (patch)
treec060577979d007fb6b39f679a4a1b732420a53f0 /tools/source
parentfe04156def447076e56a78fe1722c64ca7fcda4f (diff)
Teach INetURLObject about RFC 7230 URLs with no path but query
While RFC 2616 "Hypertext Transfer Protocol -- HTTP/1.1" defined > http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]] RFC 7230 "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing" defines > http-URI = "http:" "//" authority path-abempty [ "?" query ] > [ "#" fragment ] Change-Id: I83b1baa404d28bf3b28b1db812f8930bbc1aaf90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148064 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/fsys/urlobj.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 764bb28ef623..417618acbc94 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2985,7 +2985,8 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
case INetProtocol::Https:
case INetProtocol::Smb:
case INetProtocol::Cmis:
- if (pPos < pEnd && *pPos != '/' && *pPos != nFragmentDelimiter)
+ if (pPos < pEnd && *pPos != '/' && *pPos != nQueryDelimiter
+ && *pPos != nFragmentDelimiter)
goto failed;
while (pPos < pEnd && *pPos != nQueryDelimiter
&& *pPos != nFragmentDelimiter)