Backed out 1 changesets (bug 1402828) for failing devtools/client/netmonitor/test/browser_net_copy_as_curl.js r=backout a=backout on a CLOSED TREE

Backed out changeset 4d059e20a773 (bug 1402828)
This commit is contained in:
Andreea Pavel 2017-11-15 06:12:53 +02:00
parent 16731e0120
commit 3349ecafbd

View File

@ -88,20 +88,20 @@ const Curl = {
postData.push(escapeString(text));
ignoredHeaders.add("content-length");
}
// curl generates the host header itself based on the given URL
ignoredHeaders.add("host");
// Add method.
// For GET and POST requests this is not necessary as GET is the
// default. If --data or --binary is added POST is the default.
if (!(data.method == "GET" || data.method == "POST")) {
command.push("-X");
command.push(data.method);
}
// Add -I (HEAD)
// For servers that supports HEAD.
// This will fetch the header of a document only.
if (data.method == "HEAD") {
command.push("-I");
} else if (!(data.method == "GET" || data.method == "POST")) {
// Add method.
// For HEAD, GET and POST requests this is not necessary. GET is the
// default, if --data or --binary is added POST is used, -I implies HEAD.
command.push("-X");
command.push(data.method);
}
// Add request headers.