Skip to content

Instantly share code, notes, and snippets.

@isaacs
Forked from Marak/gist:251291
Created December 8, 2009 00:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save isaacs/251295 to your computer and use it in GitHub Desktop.
Save isaacs/251295 to your computer and use it in GitHub Desktop.
multipart.parse(req).addCallback(function(parts) {
debug.log('multipart');
resp.sendHeader(200, {
'Content-Type' : 'text/html',
'Set-Cookie' : session.setCookieHeader()
});
resp.sendBody(html);
resp.finish();
});
posix.cat("create.html").addCallback(function (content) {
application.openRequests = application.openRequests - 1;
var html = mustache.to_html(content,{
pageURL: req.uri.path
});
resp.sendHeader(200, {
'Content-Type' : 'text/html',
'Set-Cookie' : session.setCookieHeader()
});
resp.sendBody(html);
resp.finish();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment