title: Why am I Failing to combine Enumerators in SimpleResult body?
body: <p>Im trying to achieve something similar to the first example under "Sending large amounts of data" at <a href="http://www.playframework.org/documentation/2.0/ScalaStream" rel="nofollow">http://www.playframework.org/documentation/2.0/ScalaStream</a>.</p>
  
  <p>What I am doing differently is that I have more than one file that I want to concatenate in the response. It looks like this:</p>
  
  <pre><code>def index = Action {
  
    val file1 = new java.io.File("/tmp/fileToServe1.pdf")
    val fileContent1: Enumerator[Array[Byte]] = Enumerator.fromFile(file1)    
  
    val file2 = new java.io.File("/tmp/fileToServe2.pdf")
    val fileContent2: Enumerator[Array[Byte]] = Enumerator.fromFile(file2)   
  
    SimpleResult(
      header = ResponseHeader(200),
      body = fileContent1 andThen fileContent2
    )
  </code></pre>
  
  <p>}</p>
  
  <p>What happens is that only the contents of the first file is in the response.</p>
  
  <p>Something slightly simpler like below works fine though:</p>
  
  <pre><code>fileContent1 = Enumerator("blah" getBytes)
  fileContent2 = Enumerator("more blah" getBytes)
  
  SimpleResult(
    header = ResponseHeader(200),
    body = fileContent1 andThen fileContent2
  )
  </code></pre>
  
  <p>What am I getting wrong? </p>