Closed noname5551010 closed 8 years ago
Hi @pngai1,
Would you please follow the contribution guidelines for bug reports? I'll do my best to help you after that.
https://github.com/tsenart/vegeta/blob/master/CONTRIBUTING.md#issues
Thank you, Tomás
Here you go :) Thanks for your help -Peter
targets.txt = GET http://60.0.0.1/ HTTP/1.1 Host: 60.0.0.1 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 Acccept-Encoding: gzip, deflate Accept: / Accept-Language: en-US;q=0.6,en;q=0.4 Connection: keep-alive Content-Type: application/x-www-form-urlencoded
4- What did you expect to see? I expect vegeta should always use the specified HTTP headers in the targets file all the time. However, it uses default HTTP header in the 1st few HTTP packets.
5- What did you see instead? Default vegeta HTTP header was seen. Just like I didn't specify any headers in the command line.
Hello there,
I can't reproduce your issue. Which exact header isn't being sent correctly? Also, just a note, you have a typo in "Acccept-Encoding". One "c" too much.
Why don't you try to build the following server which outputs headers on every request and see if this still happens.
package main
import (
"crypto/tls"
"log"
"net/http"
"sync/atomic"
"time"
)
func main() {
count := uint64(0)
go func() {
for range time.Tick(time.Second) {
log.Printf("Rate: %d", atomic.SwapUint64(&count, 0))
}
}()
srv := http.Server{
Addr: ":6060",
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.Printf("Headers: %+v", r.Header)
atomic.AddUint64(&count, 1)
}),
}
log.Fatal(srv.ListenAndServe())
}
thanks pointing that out. i will check it. much thanks :)
Any news?
Hi Tomas,
Looks like it was my bad. It works fine after I made the headers with correction-> deleted the "c".
Much thanks you point it out for me.
Cheers, -Peter
No problem!
1st pkt sends out never follow the targets file HTTP headers... it takes a while for vegata to use the HTTP headers in the targets file... any chance to fix it?
Thanks -Peter