parser icon indicating copy to clipboard operation
parser copied to clipboard

Command line header override odd behavior for user agent / User-Agent / USER_AGENT

Open clach04 opened this issue 2 years ago • 0 comments

This may be error, user_agent versus user-agent (_ versus -) but surprising behavior with header sent.

Expected Behavior

Want to override user agent

Current Behavior

postlight-parse   http://localhost:8000/test_postlight.html --header.user_agent=my_user_agent

This appends the value my_user_agent to the end of the built in user agent with a comma. I.e. appends, ,my_user_agent

postlight-parse   http://localhost:8000/test_postlight.html --header.user-agent=my_user_agent

does replace the user agent correctly BUT also sends HTTP_USERAGENT

Steps to Reproduce

Detailed Description

Possible Solution

Worth a doc note, unclear if this is a bug but the behavior is surprising.

clach04 avatar Aug 13 '23 18:08 clach04