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 headersSent instead of _header by maritz · Pull Request #129 · expressjs/compression

Conversation

@maritz

@maritz maritz commented Jan 10, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

As discussed in #127 this PR now includes the changes that do break node v0.8 and has tests.

I did not remove the travis config for v0.8 since I'm not sure that's something that should be in a PR.

Sorry, something went wrong.

Uh oh!

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

All reactions
@maritz maritz mentioned this pull request Jan 10, 2018
Fix usage of undocumented _implicitHeader and _header #127
Closed
@maritz

maritz commented Jan 10, 2018

Copy link
Copy Markdown
Contributor Author

Hm, I just noticed that I branched from my other changes. Should I remove those changes from this PR?

All reactions

Sorry, something went wrong.

Uh oh!

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

@maritz maritz changed the title Use headersSent instead of _header WIP: Use headersSent instead of _header Jan 10, 2018
@dougwilson dougwilson self-assigned this Jan 15, 2018
@dougwilson dougwilson added the pr label Jan 15, 2018
@dougwilson

dougwilson commented Jan 15, 2018

Copy link
Copy Markdown
Contributor

Hi @maritz I can try to cut them out myself during the merge, but if you can remove them, that may be good especially in case something else changes (either in the other PR or between that PR merging and the major release to include this change).

All reactions

Sorry, something went wrong.

Uh oh!

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

@dougwilson dougwilson added enhancement needs rebase labels Jan 15, 2018
@dougwilson dougwilson added this to the 2.0 milestone Jan 15, 2018
@dougwilson
dougwilson force-pushed the master branch 3 times, most recently from d7bb81b to cd957aa Compare May 30, 2018 04:09
@maritz
maritz force-pushed the change/use_headersSent_instead_of__header branch from de4f632 to 24a6740 Compare September 27, 2018 10:50
Moritz Peters @maritz
fix: change usage of _header to headersSernt
24a6740
@maritz

maritz commented Sep 27, 2018

Copy link
Copy Markdown
Contributor Author

@dougwilson I rebased and cut out the extra commits.

All reactions

Sorry, something went wrong.

Uh oh!

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

@maritz maritz changed the title WIP: Use headersSent instead of _header Use headersSent instead of _header Sep 27, 2018
@curbengh curbengh mentioned this pull request Nov 2, 2018
Implement fixes and tests for Node http2 aickin/shrink-ray#20
Open
@Icehunter Icehunter mentioned this pull request Mar 2, 2020
Bugfix/use write head instead of implicit header #170
Merged
lamweili
lamweili suggested changes Aug 4, 2022
View reviewed changes

@lamweili lamweili left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this change be better?
It will be backwards compatible with Node.js v0.8 and not incur a semver major.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread index.js Resolved

Uh oh!

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

Comment thread index.js Resolved

Uh oh!

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

@lamweili

lamweili commented Aug 4, 2022

Copy link
Copy Markdown
Contributor

For background information regarding res._header and res.headersSent equivalence:
https://github.com/nodejs/node/blob/93e0bf9abf350637d772bcce14a5d9527b733300/lib/_http_outgoing.js#L741-L746

We can also add test cases to assert the equivalence (if really required).
The code snippet is available @ expressjs/session@35880d6.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bjohansebas
Merge branch 'master' into change/use_headersSent_instead_of__header
2a79feb
@bjohansebas bjohansebas modified the milestones: 2.0, 1.8.0 Nov 3, 2024
bjohansebas added 3 commits November 3, 2024 17:38
@bjohansebas
improve logic
1427161
@bjohansebas
Merge branch 'master' of github.com:expressjs/compression into change…
3cac105
…/use_headersSent_instead_of__header
@bjohansebas
update history
9c96376
@bjohansebas

bjohansebas commented Nov 3, 2024

Copy link
Copy Markdown
Member

We can also add test cases to assert the equivalence (if really required).
The code snippet is available @ expressjs/session@35880d6.

@lamweili I don't think we need a test for this, this change was also made in pillarjs/finalhandler#15.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bjohansebas
bjohansebas requested review from UlisesGascon and lamweili November 3, 2024 22:45
bjohansebas
bjohansebas approved these changes Nov 3, 2024
View reviewed changes

@bjohansebas bjohansebas left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@bjohansebas bjohansebas removed pr needs rebase labels Nov 3, 2024
@bjohansebas bjohansebas assigned bjohansebas and unassigned dougwilson Nov 3, 2024
@lamweili

lamweili commented Nov 3, 2024

Copy link
Copy Markdown
Contributor

We can also add test cases to assert the equivalence (if really required).
The code snippet is available @ expressjs/session@35880d6.

@lamweili I don't think we need a test for this, this change was also made in pillarjs/finalhandler#15.

All good, was coming from test/code coverage perspective.

All reactions

Sorry, something went wrong.

Uh oh!

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

lamweili
lamweili reviewed Nov 3, 2024
View reviewed changes

@lamweili lamweili left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(can't approve cause I don't have explicit access to this repository)
😮‍💨

Sorry, something went wrong.

Uh oh!

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

bjohansebas reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@bjohansebas
bjohansebas merged commit 8e5641c into expressjs:master Nov 9, 2024
@bjohansebas

bjohansebas commented Nov 9, 2024

Copy link
Copy Markdown
Member

thanks @maritz

maritz reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

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

@UlisesGascon UlisesGascon added the semver-minor label Nov 11, 2024
@bjohansebas bjohansebas mentioned this pull request Nov 29, 2024
refactor: replaced _implicitHeader expressjs/session#908
Closed
@bjohansebas bjohansebas mentioned this pull request Jan 8, 2025
release: 1.8.0 #212
Merged
@nobodysfool nobodysfool mentioned this pull request Jul 18, 2025
Bump on-headers and compression userfrosting/UserFrosting#1291
Merged
@n-dering n-dering mentioned this pull request Jul 19, 2025
Bump on-headers and compression n-dering/snake_react#2
Open
@bjohansebas bjohansebas mentioned this pull request Jan 26, 2026
feat: enable compression middleware for http/2 webpack/webpack-dev-server#5638
Merged
@mtrezza mtrezza mentioned this pull request Oct 25, 2026
fix: Bump compression from 1.7.3 to 1.8.2 parse-community/relay-examples#32
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bjohansebas bjohansebas bjohansebas approved these changes
@UlisesGascon UlisesGascon Awaiting requested review from UlisesGascon
+1 more reviewer
@lamweili lamweili lamweili requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@bjohansebas bjohansebas

Labels

enhancement semver-minor

Projects

None yet

Milestone

1.8.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

5 participants

@maritz @dougwilson @lamweili @bjohansebas @UlisesGascon
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.