MCPcopy Create free account
hub / github.com/dan-manges/m2node / MongrelRequest

Function MongrelRequest

lib/m2node/mongrel_request.js:4–11  ·  view source on GitHub ↗
(messageBuffer)

Source from the content-addressed store, hash-verified

2 var MongrelRequest;
3 MongrelRequest = (function() {
4 function MongrelRequest(messageBuffer) {
5 var bodyNS, headersAndBody, message, rawHeaders, _ref, _ref2;
6 message = messageBuffer.toString();
7 _ref = this._splitString(message, ' ', 4), this.uuid = _ref[0], this.connectionId = _ref[1], this.path = _ref[2], headersAndBody = _ref[3];
8 _ref2 = this._parseNetstring(headersAndBody), rawHeaders = _ref2[0], bodyNS = _ref2[1];
9 this.body = this._parseNetstring(bodyNS)[0];
10 this.headers = JSON.parse(rawHeaders);
11 }
12 MongrelRequest.prototype.toFullHttpRequest = function() {
13 var k, request, v, _ref;
14 request = [];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected