Skip to content

ERR_HTTP_HEADERS_SENT #3

Open
Open
@thenishantsoni78

Description

@thenishantsoni78

ERR_HTTP_HEADERS_SENT , consecutive requests to server fails.

After authentication is setup. and auth tokens are added to headers in upvote / comment components.
1st request to upvote an article works , but the 2nd request fails with this error , crashing the server Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client .

Describe your environment

OS: Ubuntu 22.04

Steps to Reproduce

  1. Add auth token to components upvote
  2. make first upvote request from article learn-node ( will work)
  3. move to second article say learn-mongo , and try to upvote it.
  4. server crashes with this error : Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    Screenshot from 2022-11-09 16-26-08 happened instead of the expected behavior? Describe the difference. -->

Possible Solution

I think, issue happens when we send same headers again.

Screenshots / Video

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions