per-vhost headers and lwsws conf support
[platform/upstream/libwebsockets.git] / test-server / test.html
index bcacdc7..80696ef 100644 (file)
@@ -137,8 +137,8 @@ to zero just this connection's number.
           <tr>
            <td align=center><div id=number style="font-size:120%;"> </div></td>
            <td align=center>
-            <input type=button id=offset value="Reset counter" onclick="reset();" >
-            <input type=button id=junk value="Send junk" onclick="junk();" >
+            <input type=button id=offset value="Reset counter">
+            <input type=button id=junk value="Send junk">
            </td>
            </tr>
         </table>
@@ -179,7 +179,7 @@ run.
        </tr>
        <tr>
        <td colspan=2>Drawing color:
-         <select id="color" onchange="update_color();">
+         <select id="color">
                <option value=#000000>Black</option>
                <option value=#0000ff>Blue</option>
                <option value=#20ff20>Green</option>
@@ -222,9 +222,9 @@ To help with open and close testing, you can open and close a connection by hand
 initiate the close, which it does with code 1001 and reason "Seeya".
 </td></tr>
                <tr>
-               <td align=center><input type=button id=ot_open_btn value="Open" onclick="ot_open();" ></td>
-               <td align=center><input type=button id=ot_close_btn disabled value="Close" onclick="ot_close();" ></td>
-               <td align=center><input type=button id=ot_req_close_btn disabled value="Request Server Close" onclick="ot_req_close();" ></td>
+               <td align=center><input type=button id=ot_open_btn value="Open"></td>
+               <td align=center><input type=button id=ot_close_btn disabled value="Close" ></td>
+               <td align=center><input type=button id=ot_req_close_btn disabled value="Request Server Close" ></td>
                </tr>
 
 </table>
@@ -289,7 +289,7 @@ This tests POST handling in lws.
        </div></td>
        </tr>
 
-<script>
+<script nonce="lwscaro">
 function check_file()
 {
        var f = document.getElementById('file').files[0];
@@ -319,8 +319,7 @@ function check_file()
   <span style="font-size:12pt;">Some text: </span>
   <input type="text" name="text" value="Give me some text">
 <br>
-  <input type="file" name="file" id="file" size="20"
-     onchange="check_file();">&nbsp;<span id=file_info style="font-size:12pt;"></span><br>
+  <input type="file" name="file" id="file" size="20">&nbsp;<span id=file_info style="font-size:12pt;"></span><br>
     <input type="submit" id="upload" name="upload" disabled=1 value="Upload">
        </form>
        </div></td>
@@ -339,7 +338,15 @@ Join the mailing list: <a href="https://libwebsockets.org/mailman/listinfo/libwe
 
 </article>
 
-<script>
+<script nonce="lwscaro">
+
+document.getElementById('file').onchange = check_file;
+document.getElementById('offset').onclick = reset;
+document.getElementById('junk').onclick = junk;
+document.getElementById('color').onclick = update_color;
+document.getElementById('ot_open_btn').onclick = ot_open;
+document.getElementById('ot_close_btn').onclick = ot_close;
+document.getElementById('ot_req_close_btn').onclick = ot_req_close;
 
 /*
  * We display untrusted stuff in html context... reject anything