acdh-oeaw / arche-core

MIT License
0 stars 1 forks source link

Wrong response content if a lock timeout happens during the final transactions table update #24

Closed zozlak closed 2 years ago

zozlak commented 2 years ago

If the lock timeout is hit in RestController::handleRequest() call to self::$transaction->prolong() and the resource metadata to be returned by the response are bigger than PHP's output bufffer, than the timeout can't be handled properly as HTTP 200 along with (first chunks) of metadata have been already sent. This leads to the wrong status code and response body containing both RDF metadata and an error message at the end.

Conclusion - no output should be sent until the response HTTP code is settled.