Created
November 10, 2015 21:39
-
-
Save nesterione/d05dee6d16013176a017 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| res.write("HTTP/1.1 200 OK\r\n".getBytes()); | |
| res.write("Date: Mon, 23 May 2005 22:38:34 GMT\r\n".getBytes()); | |
| res.write("Server: HApache/1.3.3.7 (Unix) (Red-Hat/Linux)\r\n".getBytes()); | |
| res.write("Content-Type: image/jpg\r\n".getBytes()); | |
| res.write("Content-Disposition: attachment; filename=home.jpg\r\n".getBytes()); | |
| res.write(String.format("Content-Length: %d\r\n",imageInByte.length).getBytes()); | |
| res.write("Accept-Ranges: bytes\r\n".getBytes()); | |
| res.write("Connection: close\r\n".getBytes()); | |
| res.write("\r\n".getBytes()); | |
| res.write(imageInByte); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment