Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions core-packages/http/lib/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,12 @@ function HTTPRequest (method, url, timeout) {
// request line
var head = [];
var url = this.url();
var path = url.pathname + url.search;
var path;
if (url.search) {
path = url.pathname + url.search;
} else {
path = url.pathname;
}
var request_line = "{} {} HTTP/1.1".format(this.method(), path || "/");
head.push(request_line);
// headers to string (kv) form
Expand Down Expand Up @@ -575,4 +580,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.
*/
*/