I found the problem.
The problem is that createDocxAndDownload sends a Content-Length header and my server is set to gzip those files and send them in chunked Tranfer-Encoding. Both cannot be used together: http://stackoverflow.com/questions/2419281/content-length-header-versus-chunked-encoding
Actually, I found a few solutions...
1. remove the Content-Length header from createDocxAndDownload
2. use createDocx and implement my own download (just a few lines of code)
3. disable gzip for those files
I tried all 3 solution and they all work.
I'll use #2 in my code.