Skip to content
Browse files

* Add ChangeLog

* Fix typos
  • Loading branch information...
1 parent 2f6d379 commit ec48eab9157b21921cd80d9a425b374e1f9214c5 @akaspin committed Jun 26, 2010
Showing with 12 additions and 9 deletions.
  1. +3 −0 ChangeLog
  2. +9 −9 index.js
View
3 ChangeLog
@@ -0,0 +1,3 @@
+Version 0.1
+
+* Initial Version
View
18 index.js
@@ -41,19 +41,19 @@ Handler.prototype.HEAD = function() {
};
Handler.prototype.GET = function() {
- throw new HttpError(405, "GET not implemented")
+ throw new HttpError(405, "GET not implemented");
};
Handler.prototype.POST = function() {
- throw new HttpError(405, "POST not implemented")
+ throw new HttpError(405, "POST not implemented");
};
Handler.prototype.PUT = function() {
- throw new HttpError(405, "PUT not implemented")
+ throw new HttpError(405, "PUT not implemented");
};
Handler.prototype.DELETE = function() {
- throw new HttpError(405, "DELETE not implemented")
+ throw new HttpError(405, "DELETE not implemented");
};
/**
@@ -66,23 +66,23 @@ Handler.prototype.getErrorHtml = function(code, message) {
var msg = code + ": " + message;
return "<html><title>" + msg + "</title>" +
"<body>" + msg + "</body></html>";
-}
+};
/**
* Sets response status code.
* @param code Status code
*/
Handler.prototype.setStatus = function(code) {
if (code in http.STATUS_CODES) this._statusCode = code;
-}
+};
/**
* Sets the given response header name and value.
* @param name Header name
* @param value Header value
*/
Handler.prototype.setHeader = function(name, value) {
- var value = value.toString()
+ var value = value.toString();
var safe = value.replace(/[\x00-\x1f]/, " ").substring(0, 4000);
if (safe != value) throw new Error('Unsafe header value ' + value);
this._headers[name] = value;
@@ -216,15 +216,15 @@ Handler.prototype.handleError = function(e) {
Handler.prototype._summary = function() {
return this.request.method + " " + this.request.url;
-}
+};
/**
* Just resets all to initial states.
*/
Handler.prototype.clear = function() {
this._headers = {
"Server": "node.js:" + process.version,
- "Content-Type": "text/html; charset=UTF-8",
+ "Content-Type": "text/html; charset=UTF-8"
};
this._statusCode = 200;
this._encoding = 'utf8';

0 comments on commit ec48eab

Please sign in to comment.
Something went wrong with that request. Please try again.