lib/scripts/knjappserver_cgi.rb in knjappserver-0.0.26 vs lib/scripts/knjappserver_cgi.rb in knjappserver-0.0.28

- old
+ new

@@ -69,11 +69,11 @@ knjappserver = Knjappserver.new(knjappserver_conf) knjappserver.start port = knjappserver.port #Make request. - http = Knj::Http2.new(:host => "localhost", :port => port) + http = Http2.new(:host => "localhost", :port => port) #Spawn CGI-variable to emulate FCGI part. cgi = Cgi_is_retarded.new #The rest is copied from the FCGI-part. @@ -100,20 +100,20 @@ #cgi.print "\r\n" #cgi.print Knj::Php.print_r(cgi.params, true) if cgi.request_method == "POST" and cgi.content_type.to_s.downcase.index("multipart/form-data") != nil count = 0 - http.post_multipart(url, Knjappserver.convert_fcgi_post(cgi.params), { + http.post_multipart(:url => url, :post => Knjappserver.convert_fcgi_post(cgi.params), :default_headers => headers, :cookies => false, :on_content => proc{|line| cgi.print(line) if count > 0 count += 1 } }) elsif cgi.request_method == "POST" count = 0 - http.post(url, Knjappserver.convert_fcgi_post(cgi.params), { + http.post(:url => url, :post => Knjappserver.convert_fcgi_post(cgi.params), :default_headers => headers, :cookies => false, :on_content => proc{|line| cgi.print(line) if count > 0 count += 1 \ No newline at end of file