Repository navigation
v0.1.0
Initial release: the cherrypi-fetch library and CLI, moved out of CherryPi's
crates/servo-fetch into their own crate.
Added
cherrypi-fetchas a library and as acherrypi-fetchcommand. The API is
render_page, with a process-wideconfigurefor the User-Agent and a
shutdown_rendererfor a clean exit.- The renderer behaviour that lived in CherryPi:
- same-origin GET requests from scripts (XHR and
fetch) are proxied
throughreqwestwith an 8-second timeout; other requests are left to
Servo. A render that still stalls ends at its timeout: it is returned as
incomplete if it captured some text, or fails (ok:false, exit 1) if it
captured none; - cookies, local and session storage and the HTTP cache are cleared before
every render, so one bot block cannot poison the next; - a configurable User-Agent, defaulting to Windows Firefox, because some
sites never answer a desktop Linux user agent; - snapshots that are discarded when a navigation starts, so text from an
earlier document does not leak through; - one Servo instance per process, on its own thread, ended by
shutdown_renderer; - timeouts bounded to 1–600 seconds;
--max-charstruncates text on
request.
- same-origin GET requests from scripts (XHR and
- Page titles and text are stripped of C0 and C1 control characters other
than newline and tab, and of the bidi overrides and isolates, so a page
cannot inject terminal escapes or reorder a caller's output. - CLI
--jsonrecords and exit codes: 0 when every page rendered fully, 1
when at least one failed (even if others were incomplete) or the arguments
were bad, 2 when at least one was incomplete and none failed.