tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_basic_multipart.sjs (417B)


      1 "use strict";
      2 
      3 function handleRequest(request, response) {
      4   response.setHeader(
      5     "Content-Type",
      6     "multipart/x-mixed-replace;boundary=BOUNDARY",
      7     false
      8   );
      9   response.setStatusLine(request.httpVersion, 200, "OK");
     10 
     11   response.write(`--BOUNDARY
     12 Content-Type: text/html
     13 
     14 <h1>First</h1>
     15 Will be replaced
     16 --BOUNDARY
     17 Content-Type: text/html
     18 
     19 <h1>Second</h1>
     20 This will stick around
     21 --BOUNDARY
     22 --BOUNDARY--
     23 `);
     24 }