Duplicate request headers shown in debug output. #59

glennschler opened this Issue Oct 14, 2013 · 2 comments


None yet
1 participant

Duplicate case-insensitive headers are being sent. For example, a request sends both an "Accept" and "accept" headers when setting the headers option with lower case header names. I suspect changes which resolved Issue #54 are causing the problem.

shred = new Shred ({ logCurl: true }); // to log the headers being sent

headers: {accept: "text/html"}

---- log:
curl -X GET http://.... -H "accept: text/html" -H "Accept: text/html"
.... -H "accept: text/html" -H "Accept: text/html"

My mistake, further inspection shows it is not sending duplicates. The Curl logging mechanism does indicate duplicates, and debug logging of response.request.headers also shows the same. Though debug logging of response.request._raw._headers shows the real request is fine.

From my previous experience debugging the native node.js Http response.request object, as well using Shred before Fix #54 I still believe this to be an issue. It's not a priority issue since it's only a new problem with debug logging, and when inspecting the request object using a debugger.

Verified fix. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment