WebFund 2015W: Tutorial 9

From Soma-notes
Revision as of 15:19, 23 March 2015 by Soma (talk | contribs)

This tutorial is not yet finalized.

In this tutorial you will be examining the behaviour of past applications by looking at the HTTP traffic they generate. You can see raw HTTP traffic in a browser by using various developer tools; today, however, we'll focus on looking at the raw datastream that enters and leaves a node process.

You can use a tool such as wireshark to look at the raw Ethernet and IP packets and from there reconstruct the data sent and received. If you just wish to monitor the behavior of one process, however, it is easier to instead use a tool such as socat. Among its many capabilities, socat can create a simple proxy that logs all of the data sent and received from a TCP/IP stream. For example, the following command will create a "server" on port 3001 that mirrors the behavior of that on 3000, except that you can see all of the data being sent and received output on standard error:

 socat -v TCP-LISTEN:3001,fork TCP:localhost:3000

If you want to log all of the data sent and received to a file mylogfile, we can redirect standard error as follows:

 (socat -v TCP-LISTEN:3001,fork TCP:localhost:3000) 2>mylogfile

To use these logging proxies just connect to http://localhost:3001 instead of http://localhost:3000 (after having started the node app you wish to monitor).

When looking at the output identify:

  • Where is the HTTP GET requests?
  • What does the Referer: header tell you?
  • What data is being returned to the client?

To complete this tutorial you need to either spend the time working on Assignment 8 or 9, or you should explain to the TA what was the user doing in ajax-notes and what was the state of the application during the course of the session log below. You can also download the file.

To see what HTTP commands were executed, you may want to run:

 egrep 'GET|POST' tutorial-session.txt 
> 2015/03/22 23:42:41.329085  length=632 from=0 to=631
POST /logout HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Content-Length: 0\r
Cache-Control: max-age=0\r
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r
Origin: http://localhost:3002\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Content-Type: application/x-www-form-urlencoded\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3ATY9Vsjzw_ixDY7W_9oeNTrDOTB9hMAyf.GSPMjbxG6aNKAPhQTMfzO8TuTfWMRlZXcE3X7WdF1sg\r
\r
< 2015/03/22 23:42:41.332399  length=263 from=0 to=262
HTTP/1.1 302 Moved Temporarily\r
X-Powered-By: Express\r
Location: /\r
Vary: Accept\r
Content-Type: text/html; charset=utf-8\r
Content-Length: 58\r
Date: Mon, 23 Mar 2015 03:42:41 GMT\r
Connection: keep-alive\r
\r
<p>Moved Temporarily. Redirecting to <a href="/">/</a></p>> 2015/03/22 23:42:41.334473  length=532 from=632 to=1163
GET / HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Cache-Control: max-age=0\r
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3ATY9Vsjzw_ixDY7W_9oeNTrDOTB9hMAyf.GSPMjbxG6aNKAPhQTMfzO8TuTfWMRlZXcE3X7WdF1sg\r
\r
< 2015/03/22 23:42:41.353434  length=314 from=263 to=576
HTTP/1.1 200 OK\r
X-Powered-By: Express\r
Content-Type: text/html; charset=utf-8\r
Content-Length: 588\r
ETag: W/"24c-32554b76"\r
set-cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8; Path=/; HttpOnly\r
Date: Mon, 23 Mar 2015 03:42:41 GMT\r
Connection: keep-alive\r
\r
< 2015/03/22 23:42:41.354268  length=588 from=577 to=1164
<!DOCTYPE html>
<html>
  <head>
    <title>COMP 2406 AJAX Notes Demo</title>
    <link rel="stylesheet" href="/stylesheets/style.css">
    <script src="/javascripts/jquery-1.11.2.js"></script>
  </head>
  <body>
    <h1>COMP 2406 AJAX Notes Demo</h1>
    <p>Welcome to COMP 2406 AJAX Notes Demo</p>
    <p>Please log in</p>
    <div>
      <form action="/login" method="post">
        <div>
          <input type="text" name="username">
          <label for="username">Username</label>
        </div>
        <button type="submit">Login</button>
      </form>
    </div>
  </body>
</html>> 2015/03/22 23:42:41.364712  length=553 from=1164 to=1716
GET /stylesheets/style.css HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: text/css,*/*;q=0.1\r
If-None-Match: W/"11d-2206725322"\r
If-Modified-Since: Mon, 09 Mar 2015 01:04:18 GMT\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002> 2015/03/22 23:42:41.369453  length=547 from=0 to=546
GET /javascripts/jquery-1.11.2.js HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: */*\r
If-None-Match: W/"45618-4067182892"\r
If-Modified-Since: Sun, 08/\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Lang Mar 2015 uage: en-GB,en-US;q=016:31:27 GMT\r
Us.8er-,en;q=0.6\r
Agent: MozillCooka/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/\r
Accept-ie: connect.sidEncoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFd=sefFZVoqRl8vM_ELUJl_q4kJE.%W533A2OUG9PFdefFZVoqRlml13euyLGdnq%2Fcs354W0n8vM_ELTdUJl_q4kJE.FqmWzslqMDttbkPA8\r
\r
W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
< 2015/03/22 23:42:41.376898  length=243 from=0 to=242
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
Accept-Ranges: bytes\r
Date: Mon, 23 Mar 2015 03:42:41 GMT\r
Cache-Control: public, max-age=0\r
La< 2015/03/22 23:42:41.377232  length=241 from=1165 to=1405
Hst-Modified: Sun, 08 Mar 2015 16:31:27 GMT\r
ETag: W/"4561TTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
Accept-Ran8-4067182892"\r
Connection: keep-alive\r
\r
ges: bytes\r
Date: Mon, 23 Mar 2015 03:42:41 GMT\r
Cache-Control: public, max-age=0\r
Last-Modified: Mon, 09 Mar 2015 01:04:18 GMT\r
ETag: W/"11d-2206725322"\r
Connection: keep-alive\r
\r
> 2015/03/22 23:42:44.921934  length=643 from=1717 to=2359
POST /login HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Content-Length: 14\r
Cache-Control: max-age=0\r
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r
Origin: http://localhost:3002\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Content-Type: application/x-www-form-urlencoded\r
Referer: http://localhost:3002/\r
Accept-Encoding: gzip, deflate\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
username=Alice< 2015/03/22 23:42:44.925688  length=277 from=1406 to=1682
HTTP/1.1 302 Moved Temporarily\r
X-Powered-By: Express\r
Location: /notes\r
Vary: Accept\r
Content-Type: text/html; charset=utf-8\r
Content-Length: 68\r
Date: Mon, 23 Mar 2015 03:42:44 GMT\r
Connection: keep-alive\r
\r
<p>Moved Temporarily. Redirecting to <a href="/notes">/notes</a></p< 2015/03/22 23:42:44.926553  length=1 from=1683 to=1683
>> 2015/03/22 23:42:44.928140  length=567 from=2360 to=2926
GET /notes HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Cache-Control: max-age=0\r
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
If-None-Match: W/"1c2-56281df6"\r
\r
< 2015/03/22 23:42:44.951746  length=137 from=1684 to=1820
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
ETag: W/"1c2-56281df6"\r
Date: Mon, 23 Mar 2015 03:42:44 GMT\r
Connection: keep-alive\r
\r
> 2015/03/22 23:42:44.971159  length=558 from=2927 to=3484
GET /stylesheets/style.css HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: text/css,*/*;q=0.1\r
If-None-Match: W/"11d-2206725322"\r
If-Mo> 2015/03/22 23:42:44.971318  length=552 from=547 to=1098
GET /javascripts/jquery-1.11.2.js HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: */*\r
If-None-Match: W/"45618-4067182892"\r
If-Modified-Since: Sun, 08 Mar 2015 16:31:27 GMT\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
dified-Since: Mon, 09 Mar 2015 01:04:18 GMT\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
> 2015/03/22 23:42:44.975620  length=540 from=0 to=539
GET /javascripts/notes.js HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: */*\r
If-None-Match: W/"d90-56881568"\r
If-Modified-Since: Mon, 09 Mar 2015 01:05:38 GMT\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
< 2015/03/22 23:42:44.984441  length=243 from=243 to=485
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
Accept-Ranges: bytes\r
Date: Mon, 23 Mar 2015 03:42:44 GMT\r
Cache-Control: public, max-age=0\r
Last-Modified: Sun, 08 Mar 2015 16:31:27 GMT\r
ETag: W/"45618-4067182892"\r
Connection: keep-alive\r
\r
< 2015/03/22 23:42:44.986102  length=241 from=1821 to=2061
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
Accept-Ranges: bytes\r
Date: Mon, 23 Mar 2015 03:42:44 GMT\r
Cache-Control: public, max-age=0\r
Last-Modified: Mon, 09 Mar 2015 01:04:18 GMT\r
ETag: W/"11d-2206725322"\r
Connection: keep-alive\r
\r
< 2015/03/22 23:42:44.990531  length=239 from=0 to=238
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
Accept-Ranges: bytes\r
Date: Mon, 23 Mar 2015 03:42:44 GMT\r
Cache-Control: public, max-age=0\r
Last-Modified: Mon, 09 Mar 2015 01:05:38 GMT\r
ETag: W/"d90-56881568"\r
Connection: keep-alive\r
\r
> 2015/03/22 23:42:45.042997  length=555 from=540 to=1094
GET /getNotes HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: application/json, text/javascript, */*; q=0.01\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
If-None-Match: W/"17b-6eece0ac"\r
\r
< 2015/03/22 23:42:45.050631  length=137 from=239 to=375
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
ETag: W/"17b-6eece0ac"\r
Date: Mon, 23 Mar 2015 03:42:45 GMT\r
Connection: keep-alive\r
\r
> 2015/03/22 23:42:56.873395  length=555 from=1095 to=1649
GET /getNotes HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: application/json, text/javascript, */*; q=0.01\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
If-None-Match: W/"17b-6eece0ac"\r
\r
> 2015/03/22 23:42:56.876291  length=668 from=3485 to=4152
POST /updateNote HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Content-Length: 77\r
Accept: */*\r
Origin: http://localhost:3002\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
id=550f82ba7b7b411c28258369&title=Test+3&content=Here+is+some+new+content.%0A< 2015/03/22 23:42:56.882867  length=178 from=2062 to=2239
HTTP/1.1 200 OK\r
X-Powered-By: Express\r
Content-Type: text/html; charset=utf-8\r
Content-Length: 16\r
Date: Mon, 23 Mar 2015 03:42:56 GMT\r
Connection: keep-alive\r
\r
update succeede< 2015/03/22 23:42:56.883816  length=137 from=376 to=512
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
ETag: W/"17b-6eece0ac"\r
Date: Mon, 23 Mar 2015 03:42:56 GMT\r
Connection: keep-alive\r
\r
< 2015/03/22 23:42:56.884499  length=1 from=2240 to=2240
d> 2015/03/22 23:42:56.888645  length=555 from=1650 to=2204
GET /getNotes HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: application/json, text/javascript, */*; q=0.01\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
If-None-Match: W/"17b-6eece0ac"\r
\r
< 2015/03/22 23:42:56.893370  length=195 from=513 to=707
HTTP/1.1 200 OK\r
X-Powered-By: Express\r
Content-Type: application/json; charset=utf-8\r
Content-Length: 396\r
ETag: W/"18c-f65ef26e"\r
Date: Mon, 23 Mar 2015 03:42:56 GMT\r
Connection: keep-alive\r
\r
< 2015/03/22 23:42:56.895151  length=395 from=708 to=1102
[{"_id":"550f7c2e63de66a61f6b8bdc","title":"Test 1","owner":"Alice","content":"First noteeou"},{"_id":"550f7c3863de66a61f6b8bdd","title":"Test 2","owner":"Alice","content":"second note\\nhere\\n"},{"_id":"550f82ba7b7b411c28258369","title":"Test 3","owner":"Alice","content":"Here is some new content.\\n"},{"_id":"550f82cd7b7b411c2825836a","title":"Untitled","owner":"Alice","content":"No content"}< 2015/03/22 23:42:56.898572  length=1 from=1103 to=1103
]> 2015/03/22 23:43:01.907055  length=523 from=2205 to=2727
POST /newNote HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Content-Length: 0\r
Accept: */*\r
Origin: http://localhost:3002\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
< 2015/03/22 23:43:01.911579  length=170 from=1104 to=1273
HTTP/1.1 200 OK\r
X-Powered-By: Express\r
Content-Type: application/json; charset=utf-8\r
Content-Length: 26\r
Date: Mon, 23 Mar 2015 03:43:01 GMT\r
Connection: keep-alive\r
\r
< 2015/03/22 23:43:01.912095  length=26 from=1274 to=1299
"550f8bc57b7b411c2825836b"> 2015/03/22 23:43:12.475049  length=555 from=2728 to=3282
GET /getNotes HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: application/json, text/javascript, */*; q=0.01\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
If-None-Match: W/"18c-f65ef26e"\r
\r
> 2015/03/22 23:43:12.477534  length=666 from=4153 to=4818
POST /updateNote HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Content-Length: 75\r
Accept: */*\r
Origin: http://localhost:3002\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
\r
id=550f8bc57b7b411c2825836b&title=Yet+another+note.&content=Another+one!%0A< 2015/03/22 23:43:12.501765  length=195 from=1300 to=1494
HTTP/1.1 200 OK\r
X-Powered-By: Express\r
Content-Type: application/json; charset=utf-8\r
Content-Length: 489\r
ETag: W/"1e9-51ee4cbf"\r
Date: Mon, 23 Mar 2015 03:43:12 GMT\r
Connection: keep-alive\r
\r
< 2015/03/22 23:43:12.502494  length=178 from=2241 to=2418
HTTP/1.1 200 OK\r
X-Powered-By: Express\r
Content-Type: text/html; charset=utf-8\r
Content-Length: 16\r
Date: Mon, 23 Mar 2015 03:43:12 GMT\r
Connection: keep-alive\r
\r
update succeede< 2015/03/22 23:43:12.502630  length=488 from=1495 to=1982
[{"_id":"550f7c2e63de66a61f6b8bdc","title":"Test 1","owner":"Alice","content":"First noteeou"},{"_id":"550f7c3863de66a61f6b8bdd","title":"Test 2","owner":"Alice","content":"second note\\nhere\\n"},{"_id":"550f82ba7b7b411c28258369","title":"Test 3","owner":"Alice","content":"Here is some new content.\\n"},{"_id":"550f82cd7b7b411c2825836a",< 2015/03/22 23:43:12.504349  length=1 from=2419 to=2419
d"title":"Untitled","owner":"Alice","content":"No content"},{"_id":"550f8bc57b7b411c2825836b","title":"Untitled","owner":"Alice","content":"No content"}< 2015/03/22 23:43:12.505218  length=1 from=1983 to=1983
]> 2015/03/22 23:43:12.506909  length=555 from=3283 to=3837
GET /getNotes HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: application/json, text/javascript, */*; q=0.01\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
If-None-Match: W/"1e9-51ee4cbf"\r
\r
< 2015/03/22 23:43:12.512125  length=696 from=1984 to=2679
HTTP/1.1 200 OK\r
X-Powered-By: Express\r
Content-Type: application/json; charset=utf-8\r
Content-Length: 502\r
ETag: W/"1f6-b3c3cc17"\r
Date: Mon, 23 Mar 2015 03:43:12 GMT\r
Connection: keep-alive\r
\r
[{"_id":"550f7c2e63de66a61f6b8bdc","title":"Test 1","owner":"Alice","content":"First noteeou"},{"_id":"550f7c3863de66a61f6b8bdd","title":"Test 2","owner":"Alice","content":"second note\\nhere\\n"},{"_id":"550f82ba7b7b411c28258369","title":"Test 3","owner":"Alice","content":"Here is some new content.\\n"},{"_id":"550f82cd7b7b411c2825836a","title":"Untitled","owner":"Alice","content":"No content"},{"_id":"550f8bc57b7b411c2825836b","title":"Yet another note.","owner":"Alice","content":"Another one!\\n"}< 2015/03/22 23:43:12.514633  length=1 from=2680 to=2680
]> 2015/03/22 23:43:15.931133  length=555 from=3838 to=4392
GET /getNotes HTTP/1.1\r
Host: localhost:3002\r
Connection: keep-alive\r
Accept: application/json, text/javascript, */*; q=0.01\r
X-Requested-With: XMLHttpRequest\r
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36\r
Referer: http://localhost:3002/notes\r
Accept-Encoding: gzip, deflate, sdch\r
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6\r
Cookie: connect.sid=s%3A2OUG9PFdefFZVoqRl8vM_ELUJl_q4kJE.W53ml13euyLGdnq%2Fcs354W0nTdFqmWzslqMDttbkPA8\r
If-None-Match: W/"1f6-b3c3cc17"\r
\r
< 2015/03/22 23:43:15.935885  length=137 from=2681 to=2817
HTTP/1.1 304 Not Modified\r
X-Powered-By: Express\r
ETag: W/"1f6-b3c3cc17"\r
Date: Mon, 23 Mar 2015 03:43:15 GMT\r
Connection: keep-alive\r
\r