Binary file handouts/ho01.pdf has changed
--- a/progs/ap2.js Mon Sep 25 17:16:56 2017 +0100
+++ b/progs/ap2.js Tue Sep 26 10:36:19 2017 +0100
@@ -5,7 +5,7 @@
app.use(cookie());
app.get('/', function(req, res){
- var counter = parseInt(req.cookies.counter) || 0;
+ var counter = parseInt(req.cookies.counter || "") || 0;
res.cookie('counter', counter + 1);
if (counter >= 5) {
res.write('You are a valued customer ' +
--- a/progs/ap3.js Mon Sep 25 17:16:56 2017 +0100
+++ b/progs/ap3.js Tue Sep 26 10:36:19 2017 +0100
@@ -15,8 +15,7 @@
}
app.get('/', function(req, res){
- var counter = gt_cookie(req.cookies.counter) || 0;
+ var counter = gt_cookie(req.cookies.counter || "") || 0;
res.cookie('counter', mk_cookie(counter + 1));
...
});
-
Binary file slides/slides01.pdf has changed