Confluence HTTP Header causes PDF to be downloaded instead of opened in the web browser.
Examples of headers in different application versions extracted using curl:
curl -uadmin -kI 'http://localhost:8090/download/attachments/98306/LEGOforextendedSCRUMsimulation-090222141018-phpapp01.pdf?api=v2'
5.6.4 - Downloads PDF attachment
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-ASEN: SEN-L2755100
Cache-Control: no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Confluence-Request-Time: 1419365635611
Set-Cookie: JSESSIONID=26487C66B5CD649CA007E4BB1A2A0914; Path=/; HttpOnly
X-Seraph-LoginReason: OK
X-AUSERNAME: admin
Last-Modified: Tue, 23 Dec 2014 19:20:36 GMT
ETag: "1419362436000"
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename="LEGOforextendedSCRUMsimulation-090222141018-phpapp01.pdf"
Content-Type: application/pdf;charset=UTF-8
Content-Length: 234143
Date: Tue, 23 Dec 2014 20:13:58 GMT
5.1.4 - Opens PDF attachment in the browser
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Confluence-Request-Time: 1419367278676
Set-Cookie: JSESSIONID=4E04AB85F3EF67F292E67D203EBC40FC; Path=/; HttpOnly
X-Seraph-LoginReason: OK
Last-Modified: Tue, 23 Dec 2014 20:28:23 GMT
ETag: "1419366503000"
X-Content-Type-Options: nosniff
Content-Disposition: inline; filename="LEGOforextendedSCRUMsimulation-090222141018-phpapp01.pdf"
Content-Type: application/pdf;charset=UTF-8
Content-Length: 234143
Date: Tue, 23 Dec 2014 20:41:18 GMT
Differences
1 |
Content-Disposition: attachment; filename="LEGOforextendedSCRUMsimulation-090222141018-phpapp01.pdf" |
2 |
Content-Disposition: inline; filename="LEGOforextendedSCRUMsimulation-090222141018-phpapp01.pdf" |