mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-15 21:13:02 +00:00
IIS requires content-length for POST requests
Without the content-length, LOCK requests result in 411 response with the message: "The request must be chunked or have a content length". Ref: https://forums.iis.net/t/1119456.aspx Change-Id: Ieceb2bcf478c5f6baf97ee6b89d37622da168df5 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97524 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@ -795,6 +795,9 @@ bool WopiStorage::updateLockState(const Authorization& auth, const std::string&
|
||||
if (!getExtendedData().empty())
|
||||
request.set("X-LOOL-WOPI-ExtendedData", getExtendedData());
|
||||
|
||||
// IIS requires content-length for POST requests: see https://forums.iis.net/t/1119456.aspx
|
||||
request.setContentLength(0);
|
||||
|
||||
psession->sendRequest(request);
|
||||
Poco::Net::HTTPResponse response;
|
||||
std::istream& rs = psession->receiveResponse(response);
|
||||
|
Reference in New Issue
Block a user