Commit d9fb80c7 authored by Sebastian Pekarek's avatar Sebastian Pekarek
Browse files

Merge branch 'develop'

parents f9a100af 7714d992
......@@ -332,7 +332,7 @@ var ICalCalendar = function(_data) {
*/
this.serve = function(response, filename) {
response.writeHead(200, {
'Content-Type': 'text/calendar',
'Content-Type': 'text/calendar; charset=utf-8',
'Content-Disposition': 'attachment; filename="' + (filename || 'calendar.ics') + '"'
});
response.end(generate(this));
......@@ -396,4 +396,4 @@ var ICalCalendar = function(_data) {
}
};
module.exports = ICalCalendar;
\ No newline at end of file
module.exports = ICalCalendar;
......@@ -2,7 +2,7 @@
"name": "ical-generator",
"description": "ical-generator is a small piece of code which generates ical calendar files",
"author": "Sebastian Pekarek <mail@sebbo.net>",
"version": "0.2.1",
"version": "0.2.2",
"bugs": {
"url": "http://github.com/sebbo2002/ical-generator/issues",
"email": "bugs@sebbo.net"
......@@ -18,7 +18,7 @@
"portfinder": "^0.2.1"
},
"scripts": {
"test": "istanbul cover _mocha -- -R spec && grunt"
"test": "istanbul cover _mocha -- -R spec --no-colors && grunt"
},
"preferGlobal": false,
"main": "./lib/index.js",
......
......@@ -613,7 +613,7 @@ describe('ical-generator 0.1.x', function() {
}, function(res) {
var file = '';
assert.equal(res.headers['content-type'], 'text/calendar', 'Header: text/calendar');
assert.equal(res.headers['content-type'], 'text/calendar; charset=utf-8', 'Header: text/calendar; charset=utf-8');
assert.equal(res.headers['content-disposition'], 'attachment; filename="calendar.ics"', 'Content-Disposition');
res.setEncoding('utf8');
......
......@@ -280,7 +280,7 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
}, function(res) {
var file = '';
assert.equal(res.headers['content-type'], 'text/calendar', 'Header: text/calendar');
assert.equal(res.headers['content-type'], 'text/calendar; charset=utf-8', 'Header: text/calendar; charset=utf-8');
assert.equal(res.headers['content-disposition'], 'attachment; filename="calendar.ics"', 'Content-Disposition');
res.setEncoding('utf8');
......@@ -1693,4 +1693,4 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
});
});
});
});
\ No newline at end of file
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment