Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Ability to use ClientResponse header directly for ServerResponse header #928

@nathanwdavis

Description

@nathanwdavis

I am working on something that will need to do a reverse proxy request in some cases. It would be nice to be able to simply pipe the ClientResponse headers into the ServerResponse headers somehow. Currently you have to deal with two conversions:

  • lowercase to correct mixed case header names,
  • conversion between array-type values to their correct string representation

Since the http request parser converts the header data before _addHeaderLine is even called, the raw data is gone by the time the ClientResponse callback happens.

Sstephenson's proposed fix / pull request (#259) would fix this in a pretty graceful way (I think). Or if there is another more elegant and efficient way to do this, I'd love to hear it.

I don't mind working on a patch if there is interest in this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions