mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
Ignore empty headers (#1917)
Co-authored-by: Antonin Huaut <antonin.huaut@dejamobile.com>
This commit is contained in:
parent
9ee6f9a8cc
commit
1f786871b8
@ -148,7 +148,7 @@ const prepareRequest = (request, collectionRoot, collectionPath) => {
|
||||
|
||||
// collection headers
|
||||
each(get(collectionRoot, 'request.headers', []), (h) => {
|
||||
if (h.enabled) {
|
||||
if (h.enabled && h.name.length > 0) {
|
||||
headers[h.name] = h.value;
|
||||
if (h.name.toLowerCase() === 'content-type') {
|
||||
contentTypeDefined = true;
|
||||
@ -157,7 +157,7 @@ const prepareRequest = (request, collectionRoot, collectionPath) => {
|
||||
});
|
||||
|
||||
each(request.headers, (h) => {
|
||||
if (h.enabled) {
|
||||
if (h.enabled && h.name.length > 0) {
|
||||
headers[h.name] = h.value;
|
||||
if (h.name.toLowerCase() === 'content-type') {
|
||||
contentTypeDefined = true;
|
||||
|
Loading…
Reference in New Issue
Block a user