Files
firefox/testing/web-platform/tests/tools/pywebsocket/example/special_headers.cgi
T
Geoffrey Sneddon 71a4ba0b03 Bug 1439967 [wpt PR 9606] - Update pywebsockets, a=testonly
Automatic update from web-platform-testsMerge pull request #9606 from gsnedders/update_pywebsockets

Update pywebsockets

wpt-commits: 38811892842f1db4a029ee0d4d42764c5e12ae6d
wpt-pr: 9606
wpt-commits: 38811892842f1db4a029ee0d4d42764c5e12ae6d
wpt-pr: 9606
2018-03-31 22:24:31 +01:00

29 lines
610 B
Python
Executable File

#!/usr/bin/python
# Copyright 2014 Google Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the COPYING file or at
# https://developers.google.com/open-source/licenses/bsd
"""CGI script sample for testing effect of HTTP headers on the origin page.
Note that CGI scripts don't work on the standalone pywebsocket running in TLS
mode.
"""
print """Content-type: text/html
Content-Security-Policy: connect-src self
<html>
<head>
<title></title>
</head>
<body>
<script>
var socket = new WebSocket("ws://example.com");
</script>
</body>
</html>"""