Revision a87d0554fa57fcb63a689971fbe13177e6ff030a authored by Kenichi Ishibashi on 29 March 2018, 08:11:29 UTC, committed by Blink WPT Bot on 29 March 2018, 08:21:08 UTC
This function isn't used.

Bug: 658997,402387
Change-Id: I01d751dfebaafd1580beaeb12ebcd124df132b26
Reviewed-on: https://chromium-review.googlesource.com/984919
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546765}
1 parent 55846d5
Raw File
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