<h3 dir="auto">Describe the bug</h3>
<p dir="auto">AxiosError: unexpected end of file<br>
at AxiosError.from (C:\Users\samqw\Documents\scrapping\sense\node_modules\axios\dist\node\axios.cjs:785:14)<br>
at BrotliDecompress.handleStreamError (C:\Users\samqw\Documents\scrapping\sense\node_modules\axios\dist\node\axios.cjs:2696:29)<br>
at BrotliDecompress.emit (node:events:525:35)<br>
at emitErrorNT (node:internal/streams/destroy:151:8)<br>
at emitErrorCloseNT (node:internal/streams/destroy:116:3)<br>
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {<br>
code: 'Z_BUF_ERROR',<br>
errno: -5,<br>
config: {<br>
transitional: {<br>
silentJSONParsing: true,<br>
forcedJSONParsing: true,<br>
clarifyTimeoutError: false<br>
},<br>
adapter: [ 'xhr', 'http' ],<br>
transformRequest: [ [Function: transformRequest] ],<br>
transformResponse: [ [Function: transformResponse] ],<br>
timeout: 0,<br>
xsrfCookieName: 'XSRF-TOKEN',<br>
xsrfHeaderName: 'X-XSRF-TOKEN',<br>
maxContentLength: -1,<br>
maxBodyLength: -1,<br>
env: { FormData: [Function], Blob: [class Blob] },<br>
validateStatus: [Function: validateStatus],<br>
headers: AxiosHeaders {<br>
Accept: 'application/json, text/plain, <em>/</em>',<br>
'User-Agent': 'axios/1.2.1',<br>
'Accept-Encoding': 'gzip, compress, deflate, br'<br>
},<br>
method: 'get',<br>
url: '<a href="https://www.sense.com.tr/kaban-469" rel="nofollow">https://www.sense.com.tr/kaban-469</a>',<br>
data: undefined<br>
},</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">const response = await axios.get("<a href="https://www.sense.com.tr/kaban-469" rel="nofollow">https://www.sense.com.tr/kaban-469</a>");</p>
<p dir="auto">const outerhtml = response.data;</p>
<h3 dir="auto">Code snippet</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">this snippet code above was working perfectly on "axios": "^0.21.0", before upgrading to "axios": "^1.2.1"</p>
<h3 dir="auto">Axios Version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Adapter Version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Browser</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Browser Version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Node.js Version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">OS</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional Library Versions</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context/Screenshots</h3>
<p dir="auto"><em>No response</em></p>
<p dir="auto">It seem axios simply concats the headers into a single string separated by comma rather than returning them in an array, this is problematic if a header value contains a comma.</p>
<p dir="auto">Example server:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as http from 'http';

//Lets define a port we want to listen to
const PORT = 8080;

//Create a server
const server = http.createServer((request, response) =&gt; {
    response.setHeader('x-warning', ['a', 'b']);
    response.end('It Works!! Path Hit: ' + request.url);
});

//Lets start our server
server.listen(PORT, () =&gt; {
    console.log(&quot;Server listening on: http://localhost:%s&quot;, PORT);
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">http</span> <span class="pl-k">from</span> <span class="pl-s">'http'</span><span class="pl-kos">;</span>

<span class="pl-c">//Lets define a port we want to listen to</span>
<span class="pl-k">const</span> <span class="pl-smi">PORT</span> <span class="pl-c1">=</span> <span class="pl-c1">8080</span><span class="pl-kos">;</span>

<span class="pl-c">//Create a server</span>
<span class="pl-k">const</span> <span class="pl-s1">server</span> <span class="pl-c1">=</span> <span class="pl-s1">http</span><span class="pl-kos">.</span><span class="pl-en">createServer</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">request</span><span class="pl-kos">,</span> <span class="pl-s1">response</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">setHeader</span><span class="pl-kos">(</span><span class="pl-s">'x-warning'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s">'b'</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">end</span><span class="pl-kos">(</span><span class="pl-s">'It Works!! Path Hit: '</span> <span class="pl-c1">+</span> <span class="pl-s1">request</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-c">//Lets start our server</span>
<span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">listen</span><span class="pl-kos">(</span><span class="pl-smi">PORT</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"Server listening on: http://localhost:%s"</span><span class="pl-kos">,</span> <span class="pl-smi">PORT</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; void(axios = require('axios'))
undefined
&gt; axios.get('http://localhost:8080').then(r=&gt;console.log(r.headers))
Promise { &lt;pending&gt; }
&gt; { 'x-warning': 'a, b',
  date: 'Fri, 06 Jan 2017 19:06:02 GMT',
  connection: 'close',
  'content-length': '22' }"><pre class="notranslate"><code class="notranslate">&gt; void(axios = require('axios'))
undefined
&gt; axios.get('http://localhost:8080').then(r=&gt;console.log(r.headers))
Promise { &lt;pending&gt; }
&gt; { 'x-warning': 'a, b',
  date: 'Fri, 06 Jan 2017 19:06:02 GMT',
  connection: 'close',
  'content-length': '22' }
</code></pre></div>
<p dir="auto">Curl for sanity:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl localhost:8080 -vvv
* Rebuilt URL to: localhost:8080/
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
&gt; GET / HTTP/1.1
&gt; Host: localhost:8080
&gt; User-Agent: curl/7.51.0
&gt; Accept: */*
&gt;
&lt; HTTP/1.1 200 OK
&lt; x-warning: a
&lt; x-warning: b
&lt; Date: Fri, 06 Jan 2017 19:04:49 GMT
&lt; Connection: keep-alive
&lt; Content-Length: 22
&lt;
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact
It Works!! Path Hit: /%"><pre class="notranslate"><code class="notranslate">curl localhost:8080 -vvv
* Rebuilt URL to: localhost:8080/
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
&gt; GET / HTTP/1.1
&gt; Host: localhost:8080
&gt; User-Agent: curl/7.51.0
&gt; Accept: */*
&gt;
&lt; HTTP/1.1 200 OK
&lt; x-warning: a
&lt; x-warning: b
&lt; Date: Fri, 06 Jan 2017 19:04:49 GMT
&lt; Connection: keep-alive
&lt; Content-Length: 22
&lt;
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact
It Works!! Path Hit: /%
</code></pre></div>