diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
commit | ceadffab6b357723981a429e11222daf6cd6dcfb (patch) | |
tree | 5603053048d6a460f79b22bdf165fb74d32d39b0 /testing/web-platform/tests/tools/wptserve/docs/introduction.rst | |
parent | 14fb2f966e9b54598c451e3cb35b4aa0480dafed (diff) | |
parent | ad5a13bd501e379517da1a944c104a11d951a3f5 (diff) | |
download | UXP-RC_20210225.tar UXP-RC_20210225.tar.gz UXP-RC_20210225.tar.lz UXP-RC_20210225.tar.xz UXP-RC_20210225.zip |
Merge branch 'master' into releaseRC_20210225
Diffstat (limited to 'testing/web-platform/tests/tools/wptserve/docs/introduction.rst')
-rw-r--r-- | testing/web-platform/tests/tools/wptserve/docs/introduction.rst | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/testing/web-platform/tests/tools/wptserve/docs/introduction.rst b/testing/web-platform/tests/tools/wptserve/docs/introduction.rst deleted file mode 100644 index b585a983a..000000000 --- a/testing/web-platform/tests/tools/wptserve/docs/introduction.rst +++ /dev/null @@ -1,51 +0,0 @@ -Introduction -============ - -wptserve has been designed with the specific goal of making a server -that is suitable for writing tests for the web platform. This means -that it cannot use common abstractions over HTTP such as WSGI, since -these assume that the goal is to generate a well-formed HTTP -response. Testcases, however, often require precise control of the -exact bytes sent over the wire and their timing. The full list of -design goals for the server are: - -* Suitable to run on individual test machines and over the public internet. - -* Support plain TCP and SSL servers. - -* Serve static files with the minimum of configuration. - -* Allow headers to be overwritten on a per-file and per-directory - basis. - -* Full customisation of headers sent (e.g. altering or omitting - "mandatory" headers). - -* Simple per-client state. - -* Complex logic in tests, up to precise control over the individual - bytes sent and the timing of sending them. - -Request Handling ----------------- - -At the high level, the design of the server is based around similar -concepts to those found in common web frameworks like Django, Pyramid -or Flask. In particular the lifecycle of a typical request will be -familiar to users of these systems. Incoming requests are parsed and a -:doc:`Request <request>` object is constructed. This object is passed -to a :ref:`Router <router.Interface>` instance, which is -responsible for mapping the request method and path to a handler -function. This handler is passed two arguments; the request object and -a :doc:`Response <response>` object. In cases where only simple -responses are required, the handler function may fill in the -properties of the response object and the server will take care of -constructing the response. However each Response also contains a -:ref:`ResponseWriter <response.Interface>` which can be -used to directly control the TCP socket. - -By default there are several built-in handler functions that provide a -higher level API than direct manipulation of the Response -object. These are documented in :doc:`handlers`. - - |