Ticket #662 (closed Bug: fixed)

Opened 11 months ago

Last modified 2 months ago

Perl CGI samples are broken

Reported by: barts@users.sourceforge.net Assigned to: w.olchawa
Priority: Normal Milestone: FCKeditor 2.6
Component: Server : Perl Version: SVN
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 on 03/21/08 15:13:16.
Patch proposal
662_2.patch (2.8 kB) - added by w.olchawa on 03/26/08 11:52:21.
662_3.patch (2.2 kB) - added by w.olchawa on 03/26/08 12:28:49.
Corrected little mistakes in _whatsnew.html

Change History

06/22/07 06:03:21 changed by martinkou

  • reporter changed from martinkou to barts@users.sourceforge.net.

10/06/07 14:01:35 changed by alfonsoml

  • owner changed.
  • component changed from General to Server : Perl.

03/21/08 13:35:19 changed by w.olchawa

  • keywords changed from SF to SF Confirmed HasPatch.
  • 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.

03/21/08 15:13:16 changed by w.olchawa

  • attachment 662.patch added.

Patch proposal

03/21/08 15:14:08 changed by w.olchawa

  • keywords changed from SF Confirmed HasPatch to SF Confirmed Review?.
  • owner set to w.olchawa.

03/26/08 11:52:21 changed by w.olchawa

  • attachment 662_2.patch added.

03/26/08 11:58:25 changed by wwalc

  • keywords changed from SF Confirmed Review? to SF Confirmed Review+.
  • milestone set to FCKeditor 2.6.

03/26/08 12:28:49 changed by w.olchawa

  • attachment 662_3.patch added.

Corrected little mistakes in _whatsnew.html

03/26/08 17:33:10 changed by wwalc

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

Fixed with [1809].