Spaces in function names accessed via URL

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Spaces in function names accessed via URL

Post by barry.marcus »

We have some legacy code that is, and has been, running successfully on three servers for quite a while. I have recently installed Texis on a new server and am finding that one little thing in the legacy code base is generating an error.

We have a public function called Load Project that is invoked from a URL generated elsewhere in the code. That is, the function is defined as follows:

<a name="Load Project" PUBLIC project="">
...function code here...
</a>


Elsewhere in the code a hyperlink to the Load Project function is rendered to the page as follows:

<a href=$url$linkName?project=$project>Project</a>

$linkName is defined as follows:

<$linkName="Load+Project">

Notice the plus sign (+) in the definition of $linkName. I'll admit that I've never quite gotten why this works. (That is, why, in this context, the plus sign is needed to replace the space in the name of the function when embedded in an href. But it is.) And it works on three of our four servers. However, when I run the code on the new server, a click on the "Project" hyperlink in the browser results in a "404 - File or directory not found" error, and I don't know why.

Granted, I could simply remove the space from function name and change the code in all the places that reference the function (there are quite a few). That will fix it. Then I would have to update the other three servers, etc. That would work. But I'd rather know why this is an issue on one server and not on the others. Is this a webserver config issue or a Texis config issue? I don't have a clue.

Thanks.
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Spaces in function names accessed via URL

Post by John »

Is it the same version of Texis and web server?

Spaces need to be encoded in URLs, and should be %20, but + is a legacy encoding.
John Turnbull
Thunderstone Software
Post Reply