Sha256: f704d2d2ef7fcbdfe0b9b504216c00c208c56af4f7ffc6f276d87f7bc880507d

Contents?: true

Size: 678 Bytes

Versions: 61

Compression:

Stored size: 678 Bytes

Contents

class CGIIO < Spider::ControllerIO
    attr_reader :headers_sent
    
    def initialize(out, controller_response)
        @out = out
        @controller_response = controller_response
        @headers_sent = false
    end
    
    def write(msg)
        send_headers unless @headers_sent
        @out << msg
    end
    
    def send_headers
        Spider::Logger.debug("CGI sending headers:")
        @controller_response.prepare_headers
        @headers_sent = true
        @out << "Status: #{@controller_response.status}\n"
        @controller_response.headers.each do |key, val|
            @out << "#{key}: #{val}\n"
        end
        @out << "\n"
    end
    
    
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
spiderfw-1.0.1 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-1.0.0 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.39 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.38 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.37 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.35 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.34 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.33 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.32 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.31 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.30 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.29 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.28 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.27 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.26 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.26.pre1 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.25 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.24 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.23 lib/spiderfw/http/adapters/cgi_io.rb
spiderfw-0.6.22 lib/spiderfw/http/adapters/cgi_io.rb