depot/third_party/nixpkgs/pkgs/by-name/co/collabora-online/fix-file-server-regex.patch
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02: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))
{