GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use res.headersSent to detect if the headers have been sent by mcollina · Pull Request #15 · pillarjs/finalhandler

Conversation

@mcollina

@mcollina mcollina commented May 17, 2017

Copy link
Copy Markdown
Contributor

@sebdeckers found this in nodejs/http2#130.

This PR updates the module so that it uses a public documented property wherever possible.

I do not think this is fully working with the http2 core module, as it is destroying the socket, while you would have to destroy the stream in case of http2. We will address that later on.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mcollina
Use res.headersSent to detect if the headers have been sent
8abe45a
@dougwilson dougwilson self-assigned this May 17, 2017
@dougwilson dougwilson added the pr label May 17, 2017
@dougwilson

dougwilson commented May 17, 2017

Copy link
Copy Markdown
Contributor

Nice, thanks @mcollina ! Not sure how I missed the use of res._headers in this module during the Express 4.15 release. I'll land this in the next minor for Express 4.16 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina

mcollina commented May 17, 2017

Copy link
Copy Markdown
Contributor Author

I'm wondering how @sebdeckers found it too :D.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dougwilson
dougwilson approved these changes May 17, 2017
View reviewed changes
@sebdeckers

sebdeckers commented May 17, 2017

Copy link
Copy Markdown

@mcollina 🕵️

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dougwilson dougwilson added the enhancement label Sep 16, 2017
@dougwilson dougwilson closed this in 4a527be Sep 16, 2017
dougwilson pushed a commit that referenced this pull request Sep 22, 2017
@mcollina @dougwilson
Use res.headersSent when available
e249491
closes #15
@bjohansebas bjohansebas mentioned this pull request Nov 3, 2024
Use headersSent instead of _header expressjs/compression#129
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@dougwilson dougwilson dougwilson approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dougwilson dougwilson

Labels

enhancement pr

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mcollina @dougwilson @sebdeckers
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.