Commit graph

3 commits

Author SHA1 Message Date
Reedy
75640200fb tests: Namespace api tests
Bug: T357823
Change-Id: I0d7cc2c9b166d5e5b913c1305f7cee017fe377af
2024-02-18 15:47:04 +00:00
daniel
1b6e29d7af flushOutputBuffer: improve error handling
This improves handling of edge cases around flushing buffers:
- Distingush clearly between "headers sent" and "all output sent"
  states.
- Warn when trying to flush output after output was already sent to the
  client.
- Avoid looping indefinitely when failing to delete a buffer, to work
  around a quirk of PHP's zlib.compression buffer.

Follow-up: I4ea116d60030da92be14f0283ce4dc4877c4ca13
Bug: T356578
Change-Id: Iaf34a48b89e969b8e26328f0d2512ad22ef48212
2024-02-09 12:10:59 +01:00
daniel
d79af914ff Move code from api.php into ApiEntryPoint class
The goal is to unify the high level control flow in entry points by
making them use a shared base class. Eventually, this will allow
us to test all aspects of request handling, including response
headers and output buffer handling. That will however require
us to move quite a bit of logic from ApiMain into ApiEntryPoint.

Bug: T354216
Change-Id: I4ea1cbb8b2786c24deade7d5029d95fe0c2abc57
2024-02-02 19:27:53 +00:00