mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
16731e0120
commit
3349ecafbd
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user