Guide: How to fix "unencoded WOPISrc" from Collabora with lighttpd reverse proxy

There’s an easy misconfiguration that can happen when reverse-proxying with lighttpd if you have this in your lighttpd.conf:

server.http-parseopts = (
    # ...
    "url-path-2f-decode"      => "enable",
    # ...
)

This configuration is part of URL normalization in lighttpd and recommended by the documentation. Unfortunately, Collabora requires that / be encoded as %2F in WOPISrc, and will otherwise generate a warning and fail the request with 400 Bad Request:

WRN  WOPISrc validation error: unencoded WOPISrc
ERR  #35: #35 Exception while processing incoming request

To fix this, disable the url-path-2f-decode option, like this:

server.http-parseopts += (
    "url-path-2f-decode" => "disable",
)
1 Like