Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response body truncated #120

Closed
zhanggl opened this issue Feb 25, 2014 · 3 comments
Closed

Response body truncated #120

zhanggl opened this issue Feb 25, 2014 · 3 comments

Comments

@zhanggl
Copy link

@zhanggl zhanggl commented Feb 25, 2014

Given these 2 entries in Controller:

    get("/long_resp_cn") { request =>
      render.plain(LONGSTRING_CN).toFuture
    }

    get("/long_resp_en") { request =>
      render.plain(LONGSTRING_EN).toFuture
    }

and

  val LONGSTRING_CN = """1 中文中文中文中文中文中文中文中文中文中文中文中文中文
  2 中文中文中文中文中文中文中文中文中文中文中文中文中文
  3 中文中文中文中文中文中文中文中文中文中文中文中文中文
  4 中文中文中文中文中文中文中文中文中文中文中文中文中文
  5 中文中文中文中文中文中文中文中文中文中文中文中文中文
  6 中文中文中文中文中文中文中文中文中文中文中文中文中文
  """

  val LONGSTRING_EN = """1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  """

Here are the curl results:

curl http://localhost:7070/long_resp_cn
1 中文中文中文中文中文中文中文中文中文中文中文中文中文
  2 中文中文中文中文中文中文中文中文中文中文中文中文中文
  3 中文中文中文

which got truncated.

and

curl http://localhost:7070/long_resp_en
1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

which is fine.

Also note that the test(run against a MockApp):

  "GET /long_resp_cn" should "respond with all data" in {
    get("/long_resp_cn")
    response.body.length should equal(App.LONGSTRING_CN.length)
  }

is Passed.

Maybe this is related to #112

@zhanggl
Copy link
Author

@zhanggl zhanggl commented Feb 25, 2014

Looks like this issue has been fixed by #117
Closing

@zhanggl zhanggl closed this Feb 25, 2014
@davydkov
Copy link
Contributor

@davydkov davydkov commented Feb 27, 2014

btw, would be great to add test with unicode symbols

@capotej
Copy link
Contributor

@capotej capotej commented Mar 2, 2014

Good idea, issue filed here: #122

On Thu, Feb 27, 2014 at 2:42 AM, Denis Davydkov notifications@github.comwrote:

btw, would be great to add test with unicode symbols

Reply to this email directly or view it on GitHubhttps://github.com//issues/120#issuecomment-36229670
.

Julio Capote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants