diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-03-01 15:51:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-03-01 17:41:27 +0000 |
commit | 96537cd4654df65bcde3f2ccde053800210a9d33 (patch) | |
tree | c060577979d007fb6b39f679a4a1b732420a53f0 /tools/source | |
parent | fe04156def447076e56a78fe1722c64ca7fcda4f (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.cxx | 3 |
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) |