Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Error 'wrong status line' (Net::HTTPBadResponse) #2

Closed
DannyBen opened this issue Mar 17, 2015 · 4 comments
Closed

Error 'wrong status line' (Net::HTTPBadResponse) #2

DannyBen opened this issue Mar 17, 2015 · 4 comments

Comments

@DannyBen
Copy link

When trying the sample code in the README (to get an inbox message list), I am getting this error

$ ./test2.rb
/usr/lib/ruby/1.9.1/net/http.rb:2565:in `read_status_line': wrong status line: "\x15\x03\x01\x00\x02\x02" (Net::HTTPBadResponse)
        from /usr/lib/ruby/1.9.1/net/http.rb:2552:in `read_new'
        from /usr/lib/ruby/1.9.1/net/http.rb:1320:in `block in transport_request'
        from /usr/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
        from /usr/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
        from /usr/lib/ruby/1.9.1/net/http.rb:1294:in `request'
        from /usr/lib/ruby/1.9.1/net/http.rb:1196:in `request_get'
        from /usr/lib/ruby/1.9.1/net/http.rb:455:in `block in get_response'
        from /usr/lib/ruby/1.9.1/net/http.rb:746:in `start'
        from /usr/lib/ruby/1.9.1/net/http.rb:454:in `get_response'
        from /usr/lib/ruby/gems/1.9.1/gems/mailinator-0.0.3/lib/mailinator/api.rb:28:in `perform_request'
        from /usr/lib/ruby/gems/1.9.1/gems/mailinator-0.0.3/lib/mailinator/api.rb:24:in `request'
        from /usr/lib/ruby/gems/1.9.1/gems/mailinator-0.0.3/lib/mailinator/api.rb:11:in `get'
        from /usr/lib/ruby/gems/1.9.1/gems/mailinator-0.0.3/lib/mailinator/inbox.rb:6:in `get'
        from ./test2.rb:11:in `<main>'

My ruby version:

$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

The full code I am using:

require 'mailinator'

Mailinator.configure do |config|
  config.token = '(token removed)'
end

inbox = Mailinator::Inbox.get('demo')
# email = inbox.messages.first.download
p inbox
@alvy54
Copy link
Contributor

alvy54 commented Mar 30, 2015

I am getting this error too when I run it in my Ubuntu virtual. There is a potential solution here: locomotivecms/mounter#8

I am going to create a branch and try it out. If it works I'll make a pull request.

@mjnohai
Copy link

mjnohai commented Aug 20, 2015

@ainformatico any updates on this? Thanks!

@ainformatico
Copy link
Owner

I'm really sorry guys for some reason I didn't receive any notification about this issue until yesterday's comment. I'll take a look.

@ainformatico
Copy link
Owner

Fixed in #3

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

No branches or pull requests

4 participants