From 83efa54257d42da96301cac5a2c0e80f5a89a8cd Mon Sep 17 00:00:00 2001 From: N H Date: Tue, 26 Mar 2013 14:34:21 -0400 Subject: [PATCH] I was getting undefined appended to my http calls, this seemed to fix it (url.search was undefined, would concatenate undefined to end of url) --- core-packages/http/lib/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-packages/http/lib/index.jsx b/core-packages/http/lib/index.jsx index fa19f7f..976f3f0 100644 --- a/core-packages/http/lib/index.jsx +++ b/core-packages/http/lib/index.jsx @@ -347,7 +347,7 @@ function HTTPRequest (method, url, timeout) { // request line var head = []; var url = this.url(); - var path = url.pathname + url.search; + var path = url.pathname + (url.search || ""); var request_line = "{} {} HTTP/1.1".format(this.method(), path || "/"); head.push(request_line); // headers to string (kv) form @@ -575,4 +575,4 @@ function HTTPResponse (method, encoding, request) { * However, before we could consider this optimization, we'd need to optimize the ByteString class, * and in particular make it possible and fast to concatenate / add in string data to an existing * byte class. Then we could process the data parts we receive on the fly rather than post-hoc. - */ \ No newline at end of file + */