Browse Source

uppercase request methods

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
1c5d5e0b72
  1. 2
      lib/http.js

2
lib/http.js

@ -605,7 +605,7 @@ ServerResponse.prototype.writeHeader = function () {
function ClientRequest (socket, method, url, headers) { function ClientRequest (socket, method, url, headers) {
OutgoingMessage.call(this, socket); OutgoingMessage.call(this, socket);
this.method = method; this.method = method = method.toUpperCase();
this.shouldKeepAlive = false; this.shouldKeepAlive = false;
if (method === "GET" || method === "HEAD") { if (method === "GET" || method === "HEAD") {
this.useChunkedEncodingByDefault = false; this.useChunkedEncodingByDefault = false;

Loading…
Cancel
Save