mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 04:39:07 -10:00
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
29 lines
610 B
Python
Executable File
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>"""
|