xref: /aosp_15_r20/external/cronet/net/data/websocket/set-hsts_wsh.py (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# Copyright 2015 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4#
5# Add a Strict-Transport-Security header to the response.
6
7
8import json
9
10
11def web_socket_do_extra_handshake(request):
12  request.extra_headers.append(
13      ('Strict-Transport-Security', 'max-age=3600'))
14  pass
15
16
17def web_socket_transfer_data(request):
18  # Wait for closing handshake
19  request.ws_stream.receive_message()
20