xlucagiordanox / webpagetest

Automatically exported from code.google.com/p/webpagetest
1 stars 0 forks source link

Multiple setHeader script lines will duplicate header #166

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a script that has multiple "setHeader" values with the same key.
e.g.
  setHeader Referer: Value1
  logdata 0
  navigate http://www.webpagetest.org/
  setHeader Referer: Value2
  logdata 1
  navigate http://www.webpagetest.org/

What is the expected output? What do you see instead?
The scripting documentation for setHeader states:
"Adds the specified header to every http request, overriding the header if it 
already exists."
When the first Referer value is set it overrides the ones that would naturally 
be on the resources.  However, when the second Referer value is set, it does 
not override the first value.  Instead, it appends a second header, so you now 
have:
  Referer: Value1
  Referer: Value2

What version of the product are you using? On what operating system?
WPTDriver, WPT 2.11 (356), Windows 2008r1

Please provide any additional information below.
Workaround:
  In this example you can use resetHeaders to clear the data then do the setHeader again.

Original issue reported on code.google.com by trevor.m...@strangeloopnetworks.com on 19 Jun 2013 at 6:02

GoogleCodeExporter commented 8 years ago
https://github.com/WPO-Foundation/webpagetest/issues/68

Original comment by PatMee...@gmail.com on 4 Jul 2013 at 6:11