B2G/gecko/netwerk/test/unit/test_duplicate_headers.js
// Test 7: OK to have multiple Location: headers with same value
Test 7: OK to have multiple Location: headers with same value
Test 7 : OK to have multiple Location : headers with same value
function handler7(metadata, response)
{
  var body = "012345678901234567890123456789";
  response.seizePower();
  response.write("HTTP/1.0 301 Moved\r\n");
  response.write("Content-Type: text/plain\r\n");
  response.write("Content-Length: 30\r\n");
  response.write("Location: http://localhost:4444" + testPathBase + "5\r\n");
  response.write("Location: http://localhost:4444" + testPathBase + "5\r\n");
  response.write("Connection: close\r\n");
  response.write("\r\n");
  response.write(body);
  response.finish();
}
function handler7 ( metadata , response ) { var body = "012345678901234567890123456789" ; response . seizePower ( ) ; response . write ( "HTTP/1.0 301 Moved\r\n" ) ; response . write ( "Content-Type: text/plain\r\n" ) ; response . write ( "Content-Length: 30\r\n" ) ; response . write ( "Location: http://localhost:4444" + testPathBase + "5\r\n" ) ; response . write ( "Location: http://localhost:4444" + testPathBase + "5\r\n" ) ; response . write ( "Connection: close\r\n" ) ; response . write ( "\r\n" ) ; response . write ( body ) ; response . finish ( ) ; }
Test 7: OK to have multiple Location: headers with same value
Test 7 : OK to have multiple Location : headers with same value
// redirect to previous test handler that completes OK: test 5