openzipkin / zipkin-browser-extension

Chrome and Firefox browser extensions for Zipkin
Apache License 2.0
25 stars 13 forks source link

looking up headers should be case insensitive #8

Closed camerondavison closed 8 years ago

camerondavison commented 8 years ago

I was having trouble getting this plugin to work with my setup since everything is run through http2. In the http2 spec the headers are all lowercase https://http2.github.io/http2-spec/ and https://github.com/openzipkin/zipkin-browser-extension/blob/29656c60faded3c24512c0a1c67c5ad65dbdb9e5/js/ZipkinPanel.js#L22 is checking for a header case sensitive. Since even http headers are supposed to be case insensitive, I think that the above line could become

const [traceId] = request.headers.filter(h => h.name.toLowerCase() === 'x-b3-traceid');

or everything could just be sent lowercase and then still check case sensitive, but it would work for both http and http2

camerondavison commented 8 years ago

this got merged