Changeset 2653 for lang/ruby/ssb

Show
Ignore:
Timestamp:
12/06/07 18:57:36 (13 months ago)
Author:
coji
Message:

lang/ruby/ssb: HTTPS support

Location:
lang/ruby/ssb/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/ssb/trunk/libs/ssb/ktai_spec.rb

    r2527 r2653  
    108108    def get_transformed_uri(uri) 
    109109      return nil if uri.nil? 
    110       uri = URI.parse(uri) unless uri.instance_of?(URI::HTTP) 
     110      uri = URI.parse(uri) unless uri.kind_of?(URI) 
    111111 
    112112      return uri unless get_carrier == CARRIER_DOCOMO 
  • lang/ruby/ssb/trunk/libs/ssb/request.rb

    r2526 r2653  
    88require 'cgi' 
    99require 'net/http' 
     10require 'net/https' 
    1011require 'nkf' 
    1112require 'ssb/misc' 
     
    5960    def execute 
    6061      response = nil 
    61       http_class(@http_proxy).start(@uri.host.untaint, @uri.port.untaint) do |http| 
     62 
     63      http = http_class(@http_proxy).new(@uri.host.untaint, @uri.port.untaint) 
     64      if @uri.scheme == 'https' 
     65        http.use_ssl = true 
     66        http.verify_mode = OpenSSL::SSL::VERIFY_NONE 
     67      end 
     68      http.start do 
    6269        case method 
    6370        when 'GET' 
     
    9198 
    9299      uri_base = SSB::CONFIG[:default_uri] if uri_base.nil? || uri_base == '' 
    93       uri_base = 'http://' + uri_base unless uri_base =~ /http:\/\//i 
     100      uri_base = 'http://' + uri_base unless uri_base =~ %r|https?://| 
    94101 
    95102      begin 
  • lang/ruby/ssb/trunk/public_html/stylesheets/ssb.css

    r2415 r2653  
    7878#client #sidebar #status_bar { 
    7979  width: 240px; 
    80   height: 100px; 
     80  min-height: 100px; 
     81  margin-bottom: 10px; 
    8182  float: left; 
    8283  font-size: x-small; 
     
    8586#client #sidebar #status_bar #qrcode { 
    8687  float: left; 
    87   width: 100px; 
    88   height: 120px; 
     88  min-width: 100px; 
     89  min-height: 100px; 
    8990} 
    9091