headzoo / surf

Stateful programmatic web browsing in Go.
MIT License
1.48k stars 159 forks source link

browser: copy request headers to avoid mixing across requests #29

Closed sqs closed 8 years ago

sqs commented 9 years ago

This change makes it so that buildRequest copies bow.headers before using it. This is necessary to fix an issue where cookies leak across requests because issuing an HTTP request uses the shared bow.headers map.