zachfeldman / rubypress

Ruby interface for the WordPress XMLRPC API. Follows standard XML-RPC Documentation closely.
201 stars 55 forks source link

Client should automatically use port 443 instead of port 80 when using https #28

Closed Aerlinger closed 10 years ago

Aerlinger commented 10 years ago

Calling

wp = Rubypress::Client.new(:host => "example.com", :username => "aerlinger@example.com", :password => "???", use_ssl: true)

Will result in the following error:

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol

Unless port 443 is specified in the options. It's obvious how to fix this error, as this isn't in the documentation, so should probably default to port 443 to avoid this error.

zachfeldman commented 10 years ago

Great idea! Can you submit a pull request @Aerlinger ?

coreydaley commented 10 years ago

Submitted a PR for this issue here: https://github.com/zachfeldman/rubypress/pull/29 I didn't see any rspec code for testing ssl off hand, if you point me to it I can update the test(s)

zachfeldman commented 10 years ago

Merged, tests are passing!

zachfeldman commented 10 years ago

Thanks @developercorey

coreydaley commented 10 years ago

NP, can probably close this one now :)