Ticket #662 (closed Bug: fixed)

Opened 7 years ago

Last modified 6 years ago

Perl CGI samples are broken

Reported by: barts@… Owned by: w.olchawa
Priority: Normal Milestone: FCKeditor 2.6
Component: Server : Perl Version: SVN (FCKeditor) - Retired
Keywords: SF Confirmed Review+ Cc:

Description

Each of the _samples/perl/sample*.cgi programs includes code to override the value of $BasePath. The value for the override is computed by manipulating $ENV{'PATH_INFO'}, but it ought to be manipulating $ENV{'REQUEST_URI'} instead.


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1208788&group_id=75348&atid=543653

Attachments

662.patch (2.5 KB) - added by w.olchawa 6 years ago.
Patch proposal
662_2.patch (2.8 KB) - added by w.olchawa 6 years ago.
662_3.patch (2.2 KB) - added by w.olchawa 6 years ago.
Corrected little mistakes in _whatsnew.html

Change History

comment:1 Changed 7 years ago by martinkou

  • Reporter changed from martinkou to barts@…

comment:2 Changed 7 years ago by alfonsoml

  • Component changed from General to Server : Perl

comment:3 Changed 6 years ago by w.olchawa

  • Keywords Confirmed HasPatch added
  • Version set to SVN

Hi!

I've encountered a problem in the perl examples as well. The GetServerPath function didn't find a correct server path and as a result I couldn't load the editor. Changing $ENV{'PATH_INFO'} to $ENV{'REQUEST_URI'} solve the problem. I'm not a perl expert but I think the function should be changed according to you suggestions. So the GetServerPath function would be:

sub GetServerPath
{
my $dir;

	if($DefServerPath) {
		$dir = $DefServerPath;
	} else {
		if($ENV{'REQUEST_URI'}) {
			$dir  = $ENV{'REQUEST_URI'};
		} elsif($ENV{'FILEPATH_INFO'}) {
			$dir  = $ENV{'FILEPATH_INFO'};
		}
	}
	return($dir);
}

Thank you for investigating and enjoy working with FCKeditor.

Best regards.

Changed 6 years ago by w.olchawa

Patch proposal

comment:4 Changed 6 years ago by w.olchawa

  • Keywords Review? added; HasPatch removed
  • Owner set to w.olchawa

Changed 6 years ago by w.olchawa

comment:5 Changed 6 years ago by wwalc

  • Keywords Review+ added; Review? removed
  • Milestone set to FCKeditor 2.6

Changed 6 years ago by w.olchawa

Corrected little mistakes in _whatsnew.html

comment:6 Changed 6 years ago by wwalc

  • Status changed from new to closed
  • Resolution set to fixed

Fixed with [1809].

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy