Mercurial > hg
view rust/.cargo/config @ 36861:a88d68dc3ee8
hgweb: create dedicated type for WSGI responses
We have refactored the request side of WSGI processing into a dedicated
type. Now let's do the same thing for the response side.
We invent a ``wsgiresponse`` type. It takes an instance of a
request (for consulation) and the WSGI application's "start_response"
handler.
The type basically allows setting the HTTP status line, response
headers, and the response body.
The WSGI application calls sendresponse() to start sending output.
Output is emitted as a generator to be fed through the WSGI application.
According to PEP 3333, this is the preferred way for output to be
transmitted. (Our legacy ``wsgirequest`` exposed a write() to send
data. We do not wish to support this API because it isn't recommended
by PEP 3333.)
The wire protocol code has been ported to use the new API.
Differential Revision: https://phab.mercurial-scm.org/D2775
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 10 Mar 2018 11:23:05 -0800 |
parents | 964212780daf |
children |
line wrap: on
line source
# Rust builds with a modern MSVC and uses a newer CRT. # Python 2.7 has a shared library dependency on an older CRT (msvcr90.dll). # We statically link the modern CRT to avoid multiple msvcr*.dll libraries # being loaded and Python possibly picking up symbols from the newer runtime # (which would be loaded first). [target.'cfg(target_os = "windows")'] rustflags = ["-Ctarget-feature=+crt-static"]