Ticket #662 (closed Bug: fixed)

Opened 2 years ago

Last modified 15 months 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)
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 16 months ago.
Patch proposal
662_2.patch (2.8 KB) - added by w.olchawa 16 months ago.
662_3.patch (2.2 KB) - added by w.olchawa 15 months ago.
Corrected little mistakes in _whatsnew.html

Change History

Changed 2 years ago by martinkou

  • reporter changed from martinkou to barts@…

Changed 21 months ago by alfonsoml

  • component changed from General to Server : Perl

Changed 16 months 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 16 months ago by w.olchawa

Patch proposal

Changed 16 months ago by w.olchawa

  • keywords Review? added; HasPatch removed
  • owner set to w.olchawa

Changed 16 months ago by w.olchawa

Changed 16 months ago by wwalc

  • keywords Review+ added; Review? removed
  • milestone set to FCKeditor 2.6

Changed 15 months ago by w.olchawa

Corrected little mistakes in _whatsnew.html

Changed 15 months ago by wwalc

  • status changed from new to closed
  • resolution set to fixed

Fixed with [1809].

Note: See TracTickets for help on using tickets.