https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 1670b2d4abef8c10c3c39ad9a6b1d1f0761e7045 authored by Joshua Bell on 19 March 2018, 22:26:22 UTC
Web Platform Tests: add /interfaces/webaudio.idl and corresponding test
Tip revision: 1670b2d
form-submission.py
def main(request, response):
    if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded':
        result = request.body == 'foo=bara'
    elif request.headers.get('Content-Type') == 'text/plain':
        result = request.body == 'qux=baz\r\n'
    else:
        result = request.POST.first('foo') == 'bar'

    return ([("Content-Type", "text/plain")],
            "OK" if result else "FAIL")
back to top