mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
Without these fixes, RequestServer was likely to crash if the client crashed (e.g. WebContent). This was because there was no error handling for when writing to the client failed. This is particularly an issue because RequestServer has shared instances, so it would then crash every other client of RequestServer. Then, because another RequestServer instance is not currently spun up, it becomes impossible to start any clients that need a RequestServer instance. Recreating a RequestServer should also be handled, but that's not in the scope of this change. We can tell curl that we failed to write data to the client and that the request should be aborted by returning `CURL_WRITEFUNC_ERROR` from the write callback. It is also possible for requests to be destroyed with buffered data, which is normal to happen if the client disappears (i.e. ConnectionFromClient is destroyed) or the request is cancelled by the client. We log a warning in case this is not expected, to assist with debugging related issues. |
||
|---|---|---|
| .. | ||
| ImageDecoder | ||
| RequestServer | ||
| WebContent | ||
| WebDriver | ||
| WebWorker | ||
| CMakeLists.txt | ||