-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with HTTP Status Moved (Permanently) HTTP 301 Nextcloud, Collabora & Nginx Reverse Proxies #11287
Comments
Short summary of the troublesome line as mentioned in the commit & commentary: 3ed4b49#r153381554 if (presetHttpResponse->statusLine().statusCode() != http::StatusCode::OK)
{
// ...
} The required patch could be: if (presetHttpResponse->statusLine().statusCode() != http::StatusCode::OK &&
presetHttpResponse->statusLine().statusCode() != http::StatusCode::MovedPermanently)
{
//...
} Surely, there is a more smart and dynamic alternative (C++ is not my main business) to exclude various HTTP codes that shall not negatively affect the continuation of the processing! I found the statusCode enum in https://github.com/CollaboraOnline/online/blob/3ed4b490fc84868c6dab7a2aa62eac6b3182286d/net/HttpRequest.hpp As the containers of two months ago are working fine with fixed version. Just the latest tag breaks. |
Signed-off-by: Rashesh <[email protected]> Change-Id: Id8510d9893a2dfb9eb3ece67bf7374e44085856d
Thank you for the report. I will check in few hours 🙂 |
@ksaadDE Hey, can you share your nginx config ? |
I tried reproducing the problem with following nginx config and docker compose, but no luck :(
|
Describe the Bug
When having everything properly configured (including nextcloud), the collabora system tries to grab the preset from an url, when opening a document in nextcloud.
If the preset pull response status is 301 (HTTP STATUS 301 / PERMANENTLY MOVED) e.g. due to one or multiple nginx reverse proxies, it will automatically break and report failure.
Steps to Reproduce
docker logs collabora
(shows theFailed to get settings json from [http://http_nextcloud.domain/index.php/apps/richdocuments/wopi/settings?type=systemconfig&access_token=xxxxx&fileId=-1] with status[Moved Permanently]|wsd/DocumentBroker.cpp:1820
)collabora/code:24.04.10.1.1
(this one shall work)Expected Behavior
Installation just loads and allows editing of the documents via nextcloud using collabora/code container behind nginx reverse proxies
Actual Behavior
The loading of the preset fails, due to Permanently Moved, as only HTTP STATUS OK is being checked for, thus the whole execution is aborted. See suggested patch below.
Additional Context
please read 3ed4b49#r153381554
Not sure if this belongs to online but it has the bug in the same code base so
The text was updated successfully, but these errors were encountered: