depot/pkgs/by-name/co/collabora-online/fix-file-server-regex.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

15 lines
600 B
Diff

In the nix build, COOLWSD_VERSION_HASH becomes the same as COOLWSD_VERSION, e.g.
`24.04.3.5`. The web server that serves files from
`/browser/$COOLWSD_VERSION_HASH`, doesn't expect the hash to contain dots.
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -933,7 +933,7 @@ std::string FileServerRequestHandler::getRequestPathname(const HTTPRequest& requ
std::string path(requestUri.getPath());
- Poco::RegularExpression gitHashRe("/([0-9a-f]+)/");
+ Poco::RegularExpression gitHashRe("/([0-9a-f.]+)/");
std::string gitHash;
if (gitHashRe.extract(path, gitHash))
{