Opened 10 years ago

Closed 9 years ago

#662 closed Bug (fixed)

Perl CGI samples are broken

Reported by: barts@… Owned by: Wojciech 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 (3)

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

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by Martin Kou

Reporter: changed from Martin Kou to barts@…

comment:2 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Component: GeneralServer : Perl

comment:3 Changed 9 years ago by Wojciech Olchawa

Keywords: Confirmed HasPatch added
Version: 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 9 years ago by Wojciech Olchawa

Attachment: 662.patch added

Patch proposal

comment:4 Changed 9 years ago by Wojciech Olchawa

Keywords: Review? added; HasPatch removed
Owner: set to Wojciech Olchawa

Changed 9 years ago by Wojciech Olchawa

Attachment: 662_2.patch added

comment:5 Changed 9 years ago by Wiktor Walc

Keywords: Review+ added; Review? removed
Milestone: FCKeditor 2.6

Changed 9 years ago by Wojciech Olchawa

Attachment: 662_3.patch added

Corrected little mistakes in _whatsnew.html

comment:6 Changed 9 years ago by Wiktor Walc

Resolution: fixed
Status: newclosed

Fixed with [1809].

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