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

req.uri.queryKey is undefined in latest version #7

Closed
Connorhd opened this issue Jun 6, 2009 · 2 comments
Closed

req.uri.queryKey is undefined in latest version #7

Connorhd opened this issue Jun 6, 2009 · 2 comments

Comments

@Connorhd
Copy link

Connorhd commented Jun 6, 2009

The following code works in 0.0.2 but not the latest commit

new node.http.Server(function (req, res) {
  res.sendHeader(200, [["Content-Type", "text/plain"]]);
  res.sendBody("Hello "+req.uri.queryKey.name);
  res.finish();
}).listen(8000);
puts("Server running at http://127.0.0.1:8000/");

with request http://127.0.0.1:8000/?name=Connor you get

test.js:3: TypeError: Cannot read property 'name' of undefined
  res.sendBody("Hello "+req.uri.queryKey.name);
  ^
@ry
Copy link

ry commented Jun 6, 2009

it has changed to req.uri.params. (I think I changed that in api.html in the repo - I'm not going to upload api.html until I release a new version.)

@Connorhd
Copy link
Author

Connorhd commented Jun 6, 2009

Ahh, I missed that, thanks.

bnoordhuis added a commit that referenced this issue Apr 10, 2013
Call SetPointerInInternalField(0, NULL) rather than
SetInternalField(0, Undefined()).

Fixes the following spurious NULL pointer dereference in debug builds:

  #0  0x03ad2821 in v8::internal::FixedArrayBase::length ()
  #1  0x03ad1dfc in v8::internal::FixedArray::get ()
  #2  0x03ae05dd in v8::internal::Context::global_object ()
  #3  0x03b6b87d in v8::internal::Context::builtins ()
  #4  0x03ae1871 in v8::internal::Isolate::js_builtins_object ()
  #5  0x03ab4fab in v8::CallV8HeapFunction ()
  #6  0x03ab4d4a in v8::Value::Equals ()
  #7  0x03b4f38b in CheckEqualsHelper ()
  #8  0x03ac0f4b in v8::Object::SetInternalField ()
  #9  0x06a99ddd in node::ObjectWrap::~ObjectWrap ()
  #10 0x06a8b051 in node::Buffer::~Buffer ()
  #11 0x06a8afbb in node::Buffer::~Buffer ()
  #12 0x06a8af5e in node::Buffer::~Buffer ()
  #13 0x06a9e569 in node::ObjectWrap::WeakCallback ()
srl295 referenced this issue in srl295/node-v0.x-archive Aug 4, 2014
Copied similar detection code from deps/npm/lib/utils/lifecycle.js
into npm's test/run.js to seek whether it is PATH, Path etc..
before changing it.

Fixes #7
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants