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

Duplicate Content-Disposition Header on File Download #49

Closed
wienczny opened this issue Apr 30, 2015 · 0 comments · Fixed by mailhog/MailHog-Server#1
Closed

Duplicate Content-Disposition Header on File Download #49

wienczny opened this issue Apr 30, 2015 · 0 comments · Fixed by mailhog/MailHog-Server#1

Comments

@wienczny
Copy link

When trying to download an attached file I get an error about duplicate Content-Disposition headers. Using curl I get this:

curl -v http://localhost:8025/api/v1/messages/y7BMbIFKdxn05pFmZRKNKd74z6QgScJdnKYyndNcCFQ=@mailhog.example/mime/part/2/download -o /tmp/test.pdf
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying ::1...
* Connected to localhost (::1) port 8025 (#0)
> GET /api/v1/messages/y7BMbIFKdxn05pFmZRKNKd74z6QgScJdnKYyndNcCFQ=@mailhog.example/mime/part/2/download HTTP/1.1
> Host: localhost:8025
> User-Agent: curl/7.42.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Disposition: attachment; filename="y7BMbIFKdxn05pFmZRKNKd74z6QgScJdnKYyndNcCFQ=@mailhog.example-part-2"
< Content-Disposition: inline; filename="picklist_145000114.pdf"
< Content-Transfer-Encoding: base64
< Content-Type: application/pdf
< Date: Thu, 30 Apr 2015 13:39:23 GMT
< Transfer-Encoding: chunked
< 
{ [16057 bytes data]
100 1509k    0 1509k    0     0  20.9M      0 --:--:-- --:--:-- --:--:-- 21.0M
* Connection #0 to host localhost left intact

The returned file seems to be correct, but browsers like Chrome and Firefox don't accept it because the headers are broken ;-(

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

Successfully merging a pull request may close this issue.

1 participant