-
Notifications
You must be signed in to change notification settings - Fork 37
Blog demo redirect problem, UrlFor(THome) returns empty string #2
Comments
If you not got |
Yes, I do get /a/b on the browser. THome is registered with '*' pattern (and is set as default), would that be the problem? Since the pathinfo will be / (tested and proven), even if I give a non-existent path (because it's set as default). |
The 'problem' is in the FCL-Web for FastCGI. Using this code below:
compiled for CGI and calling So the problem isnt in Brook. :/ Open a entry in Free Pascal bugtracker? |
OK, but actually I don't know what's wrong with that. I mean, should SCRIPT_NAME be equal for both? |
I don't think so. :( |
I'm still not sure what to report to FPC mantis (my brain has a problem reading specs :p), could you do that instead? |
I do not feel safe to report this due to limitation of my English. XD It would be interesting to test a small FastCGI script in another programming language (Perl?) and check if it returns this variable. |
Oh god, Perl FCGI return the SCRIPT_NAME, please see: http://brookframework.org/test.fbf Response:
The code of this test:
|
Perhaps this report is enough: SCRIPT_NAME in a FastCGI application returns empty string. What do you think? |
Perfect! Send me the issue link after you submit. |
Could you try this first on Apache? In my Nginx, I don't even find SCRIPT_NAME at all... |
Yes: http://brookframework.org/project1.fbf But if I'm not mistaken, the FastCGI not read the informations directly from the environment variables. But in my mind there is way to solve this easily: |
This will be implemented as soon as possible. :) ps. Oh, sorry friend, I accidentally deleted your comment, but I pasted it below (copied from my Gmail). x( 2013/1/7 Mario Ray Mahardhika says:
|
Hello Mario, Done (685a03e). Can you test it please? Thanks! :) |
I implemented it in "working" branch (http://imagebin.org/243220). |
Tested and works, the documentation needs to be expanded though. It should say that RootURL must be filled in order for Redirect (or UrlFor) to work |
Guy, more adjusts: cb3fcb4 Can you help me to add more details on documentation? My translator is still on vacation hehehe... |
Nice?:
|
Just to be sure, which code fills this field when it's empty? |
The new "pasdoc comment" for documentation is good? |
OK, then it's good. |
Done (538afb4). Thank you friend! |
I convert the blog demo into fastcgi project, replacing hardcoded link in the form action of newpost.html template into /post/. The problem is after I press the post button, I got empty page. The data does get in to the database though. Quick investigation shows that this piece of code:
cause the problem because UrlFor(THome) returns empty string.
The text was updated successfully, but these errors were encountered: