GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — Get all headers 3992 by iankronquist · Pull Request #170 · nodejs/node Conversation
Contributor
Thanks @chrisdickinson for the pointer to this bug.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there might be two too many newlines here.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to return a copy of headers instead of the full object -- something like
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should probably be something like:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsTest a getAllHeaders function. It should return an object representing the headers in a request.
iankronquist
force-pushed
the
getAllHeaders-3992
branch
from
9a2367e to
5bd1f5e
Compare
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the late comment, but wouldn't this omit the added-by-default headers
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. var headers; var rando = Math.random(); var expected = util._extend({}, { 'X-Random-Thing': rando, /* other values */ }); var server = http.createServer(function(req, res) { res.setHeader('X-Random-Thing', rando); headers = res.getAllHeaders(); res.end('hello'); assert.strictEqual(res.getAllHeaders(), null); }); server.listen(common.PORT, function() { http.get({port: common.PORT}, function(resp) { assert.deepEqual(response.headers, expected); server.close(); }); });
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Users should not have to access private attributes like res._headers in order to get all the headers in a request. Define a method getAllHeaders to return an object which is a copy of re._headers Fixes issue nodejs#3992
iankronquist
force-pushed
the
getAllHeaders-3992
branch
from
8b9c94a to
427fd00
Compare
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
eti-p-doray
pushed a commit
to eti-p-doray/node
that referenced
this pull request
Use TypedArray::kMaxByteLength instead.
syg
pushed a commit
to syg/node
that referenced
this pull request
Use TypedArray::kMaxByteLength instead.
eti-p-doray
pushed a commit
to eti-p-doray/node
that referenced
this pull request
Use TypedArray::kMaxByteLength instead.
syg
pushed a commit
to syg/node
that referenced
this pull request
Use TypedArray::kMaxByteLength instead.
bakkot
pushed a commit
to bakkot/node
that referenced
this pull request
Use TypedArray::kMaxByteLength instead.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
http
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |