nuxt / http

Universal HTTP Module for Nuxt.js
https://http.nuxtjs.org
MIT License
229 stars 51 forks source link

fix: lowercase `accept-encoding` header #43

Closed atinux closed 5 years ago

atinux commented 5 years ago

Actually, since accept-encoding is not in proxyHeadersIgnore and that we overwrite Accept-Encoding, it still fails on node.js when using Chrome (asking for 'gzip, deflate, br').

This fixes the issue.

codecov-io commented 5 years ago

Codecov Report

Merging #43 into dev will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##             dev     #43   +/-   ##
=====================================
  Coverage   86.2%   86.2%           
=====================================
  Files          1       1           
  Lines         29      29           
  Branches      13      13           
=====================================
  Hits          25      25           
  Misses         3       3           
  Partials       1       1

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 073663d...8453372. Read the comment docs.

pimlie commented 5 years ago

Should we forcibly lowercase all header names in setHeader maybe? Not sure what happens when you have both 'accept-encoding' as 'Accept-Encoding' (eg in which order Ky / fetch.Headers apply those)

pi0 commented 5 years ago

@pimlie Sure. Nice idea. Can be moved to another PR tough.