Skip to content

Comments

Sharmarke#7

Open
sharmarkei wants to merge 4 commits intocodefellows-javascript-401d17:masterfrom
sharmarkei:sharmarke
Open

Sharmarke#7
sharmarkei wants to merge 4 commits intocodefellows-javascript-401d17:masterfrom
sharmarkei:sharmarke

Conversation

@sharmarkei
Copy link

No description provided.

}
}

if (req.url.pathname ==='/') {
Copy link

Choose a reason for hiding this comment

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

with this as the same pathname as the post if you make a post to / this will sometimes hit causing a 'write after end error' when you close the response a 2nd time.

res.writeHead(200, {
'Content-Type': 'text/plain'
});
res.write(cowsay.say({text: params.query}));
Copy link

Choose a reason for hiding this comment

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

what is params.query here? shouldn't it be something else?

res.writeHead(200, {
'Content-Type:': 'text/plain'
});
res.end();
Copy link

Choose a reason for hiding this comment

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

Need to actually cowsay something here before it ends.

res.end();
} else {
res.writeHead(200, {
'Content-Type:': 'text/plain'
Copy link

Choose a reason for hiding this comment

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

extra semicolon here in content-type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants