removing unused options (#565)

dev
Mzack9999 2021-02-22 16:11:42 +01:00 committed by GitHub
parent 78d32b8900
commit 5dde61f0a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 6 deletions

View File

@ -52,10 +52,6 @@ type Request struct {
Pipeline bool `yaml:"pipeline"`
// Specify in order to skip request RFC normalization
Unsafe bool `yaml:"unsafe"`
// DisableAutoHostname Enable/Disable Host header for unsafe raw requests
DisableAutoHostname bool `yaml:"disable-automatic-host-header"`
// DisableAutoContentLength Enable/Disable Content-Length header for unsafe raw requests
DisableAutoContentLength bool `yaml:"disable-automatic-content-length-header"`
// Race determines if all the request have to be attempted at the same time
// The minimum number of requests is determined by threads
Race bool `yaml:"race"`

View File

@ -244,8 +244,6 @@ func (r *Request) executeRequest(reqURL string, request *generatedRequest, dynam
hostname = parsed.Hostname()
}
options := request.original.rawhttpClient.Options
options.AutomaticContentLength = !r.DisableAutoContentLength
options.AutomaticHostHeader = !r.DisableAutoHostname
options.FollowRedirects = r.Redirects
options.CustomRawBytes = []byte(request.rawRequest.UnsafeRawBytes)
resp, err = request.original.rawhttpClient.DoRawWithOptions(request.rawRequest.Method, reqURL, request.rawRequest.Path, generators.ExpandMapValues(request.rawRequest.Headers), ioutil.NopCloser(strings.NewReader(request.rawRequest.Data)), options)