honeybadger-io / incoming

Incoming! helps you receive email in your Rack apps.
https://www.honeybadger.io/
MIT License
309 stars 19 forks source link

Rack:Request is not the same as ActionDispatch::Request #6

Closed jpmckinney closed 11 years ago

jpmckinney commented 11 years ago

Notably, they handle attachments differently. I set up two servers for Mailgun to POST to. Here are the results:

You'll notice that in the pure Rack environment, attachment-1 is a hash. In Rails, it's an ActionDispatch::Http::UploadedFile object. Your code assumes you are passing a ActionDispatch::Http::UploadedFile object to the Mailgun receiver.

I just ran into this in my own project MultiMail. I handle both cases now by checking if attachment-1 is a hash.

joshuap commented 11 years ago

Awesome, thanks for the report. If you have time we'd love a pull request, otherwise I'll add this one to my own todo list. :thumbsup: