Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty header in headers list results in SyntaxError: Failed to execute 'setRequestHeader' #765

Closed
vadistic opened this issue Apr 13, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@vadistic
Copy link

Describe the bug
When the empty header is present in headers list in graphql tab any call results in syntaxt error.

// response field
SyntaxError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '' is not a valid HTTP header field name.. Check console for details.
// console
Error DOMException: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '' is not a valid HTTP header field name.
    at https://postwoman.io/_nuxt/be6fd6eac58c44d1d090.js:2:162095
    at Object.h [as forEach] (https://postwoman.io/_nuxt/be6fd6eac58c44d1d090.js:2:73192)
    at https://postwoman.io/_nuxt/be6fd6eac58c44d1d090.js:2:162011
    at new Promise (<anonymous>)
    at t.exports (https://postwoman.io/_nuxt/be6fd6eac58c44d1d090.js:2:160865)
    at t.exports (https://postwoman.io/_nuxt/be6fd6eac58c44d1d090.js:2:184050)

To Reproduce

  1. Go to https://postwoman.io/graphql
  2. Add some valid query + header (eg. Authorization)
  3. Click "Add new" to add empty header
  4. Smash green execute button
  5. See error

Expected behavior
I would expect empty headers to be ignored.

I think it's quite common to e.g. add header an forgot about it later, or click "Add header" too many times - when testing something on the run - which I believe what postwoman is for.

In case empty header field is no-go, then I would expect this error to be handled.

I've searched for a bit, but I do not believe there's issue about it - so I thought I would let you know

Cheers!

@vadistic vadistic changed the title Empty headers list row results in SyntaxError: Failed to execute 'setRequestHeader' Empty header in headers list results in SyntaxError: Failed to execute 'setRequestHeader' Apr 13, 2020
@liyasthomas liyasthomas added the bug Something isn't working label Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants