Changesets can be listed by changeset number.
The Git repository is here.
Changeset 384
Assume CVS change logs are in ISO 8859-1 and may contain high bit set
characters; convert properly to UTF-8. Fixes Ticket #157.
- Comitted by: rool
- Date: Monday March 21 14:11:04 2011 (over 13 years ago)
Affected files:
rool/rails/rcvsweb/trunk/app/controllers/application.rb:
prev. | current | |
class ApplicationController < ActionController::Base | ||
19 | require 'iconv' | |
20 | ||
# Hub single sign-on support. | ||
require 'hub_sso_lib' | ||
... | ... | |
def capture_script_output(script_location, extra_prefix) | ||
# Get the request URI in a way that works for FCGI and regular | ||
43 | | |
44 | | |
45 | # CGI, at least for LightTPD. Strip off the root path prefix | |
46 | # (location of the Rails application) if present. | |
uri = @request.env['REQUEST_URI'].dup # NOT a full URI | ||
47 | | |
49 | uri.slice!(root_path()) | |
# Split off the query string section, if there is one. | ||
... | ... | |
case key | ||
when 'SCRIPT_NAME' | ||
79 | | |
81 | value = root_path().chop + extra_prefix | |
when 'SCRIPT_FILENAME' | ||
value = "#{RAILS_ROOT}/public/dispatch.cgi" | ||
when 'PATH_INFO' | ||
... | ... | |
end # From needed.each | ||
# Add the CVSweb command to the command string and execute it. | ||
99 | | |
101 | # Return the output of the command; assume Latin-1 and convert | |
102 | # to UTF-8 in passing. | |
command += "#{script_location}" | ||
102 | | |
105 | return Iconv.conv("UTF8", "ISO-8859-1", `#{command}`) | |
end | ||
# Parse script output - pass the raw output data from the script and a |