Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread


By: Steven Ketcham
RE: IE 6.0 and CGI [ reply ]  
2004-03-01 12:46
Yes, I see the fix for the templates. This is good.

There are two other problems:
There is a caching problem I *think* it can be handled in ruwiki.rb:
# Outputs the page.
def output
@response.add_header("Content-type", "text/html")...snip...
@response.add_header("Cache-Control", "max-age=0")

and when used as a CGI the 'topic' parameter is unavailable. Which I *think* can be handled in handler.rb with the other code snippet I sent.


By: Alan Chen
RE: IE 6.0 and CGI [ reply ]  
2004-03-01 07:45
The workaround fix for this was checked into CVS -- removal of the <u>..</u> markup in the save button. The ruwiki.rb handling code needs to be cleaned up a little. In particular, I think separating the concept of a particular web page should be separated from the handling of a wiki topic. It would make things a little cleaner.

By: Steven Ketcham
IE 6.0 and CGI [ reply ]  
2004-02-29 22:05
OK. I tried using ruwiki at home and I was sort of successfull. I did find that IE handles form variables slightly different than the expected code. It might be worth while to change the edit template to use Javascript for the submitions as opposed to using submit buttons (IE uses the title of the submit button for the value as oppsed to the ...value).

I also had trouble using ruwiki as a CGI because the 'topic' parameter was not available from the address.

I have some code that got me going but I am not sure if it is what should be used. If it is great.

Code samples to follow (two different files):

in ruwiki.rb

def process_page


if @action
case @action
when 'edit', 'create'


when 'save', '<u>s</u>ave' # <----- IE handles this differently


when 'cancel', '<u>c</u>ancel' # <----- IE handles this differently

# Outputs the page.
def output
@response.add_header("Content-type", "text/html")
@response.add_header("Cache-Control", "max-age=0") # <----- This seems to prevent caching but I am not 100% on it.
@response << @rendered_page

in handler.rb

# Request for CGI-based activity to ruwiki.
class CGIRequest < AbstractWebRequest
def initialize(cgi, output_stream = $stdout)
@environment = ENV
@cgi = cgi
@parameters = {}
cgi.params.each { |k, v| @parameters[k] = v[0] }

# CGI handling with APACHE 2.0.43
testTopic = @parameters.has_key? 'topic'
testProject = @parameters.has_key? 'project'
if testTopic == false && testProject == true then
project = @parameters['project']
envPathInfo = ENV['PATH_INFO']
envPathInfo.split('/').each do |value|
@parameters['topic'] = value if value != project