Skip to content

Conversation

@hfiguiere
Copy link
Contributor

@hfiguiere hfiguiere commented Jan 5, 2026

%SRV_PROTO% will be replaced by http or https as needed in the discovery file.

Part of #13894

Change-Id: I2e6a7e3a05850cc856bbcbc081414d8ad89e4cff

Summary

Some consideration: any WOPI Host that was looking for the net-zone by name despite it being incorrect might need to be fixed.

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

%SRV_PROTO% will be replaced by http or https as needed
in the discovery file.

Part of #13894

Signed-off-by: Hubert Figuière <[email protected]>
Change-Id: I2e6a7e3a05850cc856bbcbc081414d8ad89e4cff
@hfiguiere hfiguiere force-pushed the private/hub/net-zone branch from 76aa327 to 3aa6444 Compare January 6, 2026 15:18
@hfiguiere hfiguiere requested a review from vmiklos January 6, 2026 17:50
Copy link
Contributor

@vmiklos vmiklos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me and looks reasonable, thanks.

Nit: did you consider covering this change with a test? You can do that in UnitHosting::testDiscovery() with some new asserts, I guess.

COOLWSD::ServiceRoot;
if (requestDetails.isProxy())
srvUrl = requestDetails.getProxyPrefix();
Poco::replaceInPlace(xml, std::string("%SRV_URI%"), srvUrl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Is this still needed? As far as I see, we don't have a %SRV_URI% placeholder in discovery.xml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The discovery.xml file is preprocessed here:

https://github.com/CollaboraOnline/online/blob/main/wsd/ClientRequestDispatcher.cpp#L2643

before being loaded into the static cache.

It add the urlsrc attributes to the entries (they are not in the file)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha! I wasn't aware of that, thanks.

@github-project-automation github-project-automation bot moved this from To Review to To Test in Collabora Online Jan 7, 2026
@vmiklos vmiklos merged commit bde6a07 into main Jan 7, 2026
15 checks passed
@vmiklos vmiklos deleted the private/hub/net-zone branch January 7, 2026 08:40
@github-project-automation github-project-automation bot moved this from To Test to Done in Collabora Online Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

WOPI Discovery Content

2 participants