B2G/gecko/netwerk/test/httpserver/test/head_utils.js
/**
 * Spew a bunch of HTTP metadata from request into the body of response.
 *
 * @param request : nsIHttpRequest
 *   the request whose metadata should be output
 * @param response : nsIHttpResponse
 *   the response to which the metadata is written
 */
Spew a bunch of HTTP metadata from request into the body of response.
@param request : nsIHttpRequest
the request whose metadata should be output
@param response : nsIHttpResponse
the response to which the metadata is written
Spew a bunch of HTTP metadata from request into the body of response . @param request : nsIHttpRequest the request whose metadata should be output @param response : nsIHttpResponse the response to which the metadata is written
function writeDetails(request, response)
{
  response.write("Method:  " + request.method + "\r\n");
  response.write("Path:    " + request.path + "\r\n");
  response.write("Query:   " + request.queryString + "\r\n");
  response.write("Version: " + request.httpVersion + "\r\n");
  response.write("Scheme:  " + request.scheme + "\r\n");
  response.write("Host:    " + request.host + "\r\n");
  response.write("Port:    " + request.port);
}
function writeDetails ( request , response ) { response . write ( "Method:  " + request . method + "\r\n" ) ; response . write ( "Path:    " + request . path + "\r\n" ) ; response . write ( "Query:   " + request . queryString + "\r\n" ) ; response . write ( "Version: " + request . httpVersion + "\r\n" ) ; response . write ( "Scheme:  " + request . scheme + "\r\n" ) ; response . write ( "Host:    " + request . host + "\r\n" ) ; response . write ( "Port:    " + request . port ) ; }
Spew a bunch of HTTP metadata from request into the body of response.
Spew a bunch of HTTP metadata from request into the body of response .