Mercurial > hg
view tests/test-fuzz-targets.t @ 36803:8e1556ac01bb
hgweb: validate WSGI environment dict
The wsgiref.validate module contains useful functions for validating
that various WSGI data structures are proper.
This commit adds validation of the environment dict to our built-in
HTTP server, which turns an HTTP request into an environment dict.
The check discovered that we weren't always setting QUERY_STRING,
which would cause the cgi module to fall back to sys.argv. So we
change things to always set QUERY_STRING.
The check passes on Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D2731
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 08 Mar 2018 09:44:27 -0800 |
parents | 2b9e2415f5b5 |
children | 24cc2969abae |
line wrap: on
line source
#require clang-libfuzzer test-repo $ cd $TESTDIR/../contrib/fuzz $ make Just run the fuzzer for five seconds to verify it works at all. $ ./bdiff -max_total_time 5