Seems a missing media type is caused unhandled exception in MIME
Unhandled exception on HTTP::Handler
Parsing error: Missing media type ("") (MIME::Error)
from /usr/share/crystal/src/mime/media_type.cr:228:19 in 'parse'
from /usr/share/crystal/src/http/client/response.cr:67:7 in '->'
from /usr/share/crystal/src/http/server/request_processor.cr:255:3 in 'process'
from /usr/share/crystal/src/fiber.cr:255:3 in 'run'
from ???
Bonus point if fixed using String#presence at HTTP::Client::Response#mime_type ?
I assume you're asking for the MIME type of the empty string?
@rdp nope, it's a HTTP::Client::Response which comes back with empty Content-Type header - see the stack trace (@bararchy, please correct me if I'm wrong).
Most helpful comment
Bonus point if fixed using
String#presenceatHTTP::Client::Response#mime_type?