wangluozhe / requests

用于快速请求HTTP或HTTPS,并支持修改ja3、ja4指纹
GNU General Public License v3.0
417 stars 93 forks source link

panic: assignment to entry in nil map #63

Open solo-xwz opened 6 months ago

solo-xwz commented 6 months ago

image how to avoid this?

8763232 commented 5 months ago

`

func (h Header) write(w io.Writer, trace *httptrace.ClientTrace) error { return h.writeSubset(w, nil, trace) exclude is nil? }

func (h Header) writeSubset(w io.Writer, exclude map[string]bool, trace *httptrace.ClientTrace) error { ....... mutex.Lock() exclude[HeaderOrderKey] = true problem is there! exclude[PHeaderOrderKey] = true exclude[UnChangedHeaderKey] = true mutex.Unlock() ......

@wangluozhe you need fix,pls!