Page MenuHomePhabricator

RESTBase should fall back to Parsoid/JS if it receives 421 from Parsoid/PHP
Closed, ResolvedPublic

Description

As stated in T237556: Detect html2wt reqs issued to Parsoid/PHP with data-parsoid blobs generated by Parsoid/JS and issue a HTTP 421, Parsoid/PHP will throw a 421 if we supply it data-parsoid belonging to Parsoid/JS. Currently, RESTBase checks for 404s (coming from storage) to provide the fall-back. The logic here is that if RESTBase hands out HTML generated by Parsoid/JS, then the matching data-parsoid will be stored in js tables; if, during transform the main variant is Parsoid/PHP, a 404 will occur when trying to get the data-parsoid from storage. With the additional protection supplied by Parsoid/PHP, RESTBase should have a fall-back for that case as well.