Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Whtat's the problem with my environment? #35

Open
ruandao opened this issue Nov 15, 2015 · 0 comments
Open

Whtat's the problem with my environment? #35

ruandao opened this issue Nov 15, 2015 · 0 comments

Comments

@ruandao
Copy link

ruandao commented Nov 15, 2015

when I run into Exercise 4 of 11
I get the result:

1.  ACTUAL:    "`/json` respond body: {\"foo\":\"bar\"}"
1.  EXPECTED:  "`/json` respond body: {\"foo\":\"bar\"}"

2.  ACTUAL:    "`/json` respond content-type: application/json; charset=utf-8"
2.  EXPECTED:  "`/json` respond content-type: application/json; charset=utf-8"

3.  ACTUAL:    "`/stream` respond body: {\"foo\":\"bar\"}"
3.  EXPECTED:  "`/stream` respond body: Setting a stream as a body."

4.  ACTUAL:    "`/stream` respond content-type: application/json; charset=utf-8"
4.  EXPECTED:  "`/stream` respond content-type: application/octet-stream"

5.  ACTUAL:    "`/stream` respond transfer-encoding: undefined"
5.  EXPECTED:  "`/stream` respond transfer-encoding: chunked"

6.  ACTUAL:    ""
6.  EXPECTED:  ""

my source code was:

app.use(function*(next) {
    if (this.path !== '/stream') {
        yield next;
    };

    this.body = fs.createReadStream(process.argv[3]);
})

I had been read the solution, it seem that my code was correct
so is it the environment problem?

cpu:hello r$ node -v
v5.0.0
cpu:hello r$ npm -v
3.3.6
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant