r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Web] Everything web development related

Anton
8-Feb-2005
[408x12]
This type of mapping could cause collisions (there might be a url 
with a %3F already in place of the ?) but I think this imperfect 
system is better than not being able to map at all.
So the initial goal for me is just to map the ? character, then later 
I will see about other non-allowed characters. I think it is ? who 
is causing all or most of the problem.
PATH-THRU currently looks like this:
path-thru: func [
    "Return a path relative to the disk cache."
    url /local purl
][
    if file? url [return url]
    if not all [purl: decode-url url purl/host] [return none]

    rejoin [view-root/public slash purl/host slash any [purl/path ""] 
    any [purl/target ""]]
]
So the quick solution seems to be to modify the last line, using 
REPLACE to change "?" -> "%3F"
replace rejoin [view-root/public slash purl/host slash any [purl/path 
""] any [purl/target ""]] "?" "%3F"
Indeed PATH-THRU seems to work on this url, as well as LOAD-THRU 
and EXISTS-THRU? (they all rely on PATH-THRU)
>> path-thru http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r

== %/D/Anton/Dev/Rebol/View/public/www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r%3Fscript-name=slim.r

>> load-thru http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r
connecting to: www.rebol.org
connecting to: www.rebol.org
== [
    SLiM: make object! [
        id: 1
        slim-path: what-dir
        libs: []
        paths: []
        linked-libs:...

>> exists-thru? http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r

== %/D/Anton/Dev/Rebol/View/public/www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r%3Fscript-name=slim.r
So that looks good. Unless anyone has any objections I will post 
it to RAMBO as a feature request.
In future, I think a proper mapping function (probably using PARSE) 
should be created, and path-thru would use that instead of REPLACE, 
but until then I think this is a very good and cheap fix.
OK, I posted a RAMBO ticket for this.
Anyone got any advice on allowability of "?" in filenames on *nix 
?
Rebolek
8-Feb-2005
[420]
I don't know, but "?" can be used as a wildcard on *nix, so I think 
it's not supported in filenames (but I've no real experience with 
*nix)
Anton
8-Feb-2005
[421x5]
Mmm.. I think (without checking any official specs yet) that the 
mapping problem is not so bad, because allowed character set for 
URLs is quite restricted, so it should be smaller than allowed characters 
on most filesystems. On the other hand, maybe the intersection of 
allowed characters on all rebol-supported filesystems is actually 
smaller...
Kru, as I understood on unix, filenames could contain any ascii characters 
0-255, but using characters such as "?" would confuse a lot of programs, 
so it was avoided. I don't know what the situation is these days.. 
Maybe they are more restrictive of allowed filenames.
Ok, to the google search !
First link looks interesting:
http://linux-ntfs.sourceforge.net/ntfs/concepts/filename_namespace.html
Sunanda
8-Feb-2005
[426]
URLs are not technically very restricted. Can't remember the details 
off hand -- Google for RFC1630.

But many implementations are restricted  in random and petty ways.
Anton
8-Feb-2005
[427x4]
Thanks Sunanda, just skipping through it now... as I expected, a 
complex fudge. :)
http://www.w3.org/Addressing/rfc1630.txt
Towards the bottom there seem to be some BNF parse rules for WWW 
URIs.
But my energy for tonight is just about to expire... Luckily I just 
installed the "SessionSaver" extension for Firefox (keeps documents 
persistent), so I can just close firefox and go offline. Nice plugin.
Chris
16-Feb-2005
[431]
IE7?  -- Security updates, apparently.  No changes to the rendering 
engine?  *cough* PNG *cough* CSS
http://www.mezzoblue.com/archives/2005/02/15/ie7/index.php
Graham
16-Feb-2005
[432]
about time.  It's a nightmare trying to clean spyware off ....
shadwolf
16-Feb-2005
[433]
graham i agree with you that"s why i use opera 90% of the time
Pekr
16-Feb-2005
[434]
Chris - today one MS defender on Czech phorum argued following way 
- W3C are morons, who did everything to have the main word in defining 
standards. According to such person, only IE supports properly xsl, 
SMIL and VRML and that PNG can be used with some trick ...
BrianW
16-Feb-2005
[435]
Pekr: You can let that person know that MS is a member of the w3c, 
last I heard.
Chris
16-Feb-2005
[436x2]
Who uses XSL, SMIL or VRML?  And the PNG trick privides marginally 
better alpha PNG support -- but only 32-bit and not in CSS.  Look, 
there is a standard document format -- XHTML.  There is a standard 
way to make it look nice on multiple mediums -- CSS.  And a standard 
way to add images -- PNG.  As the major web browser, IE limits these 
standards (CSS + PNG) through limited support -- that sucks.
I want to create documents that look good no matter who is looking 
in.
Pekr
16-Feb-2005
[438]
I know - ppl did not let him argue anymore ... he was not able to 
provide valid arguments for MS not taking browser enhancements back 
to older Win versions. Producing IE 7 for XP only is not a solution 
...
Henrik
16-Feb-2005
[439]
why would MS update the browser? that only breaks with existing IE 
only websites/apps
shadwolf
16-Feb-2005
[440]
because they update MSN messenger so as the browser is par of the 
package they update it too
Vincent
16-Feb-2005
[441]
yes, and if you don't want MSN messenger - you have to uninstall 
it at each IE security update
Tim
18-Feb-2005
[442]
Any CGI gurus here? I've just started setting for CGI on windows 
after years on Linux. I can't figure out how to get the proper registry 
entries so that I can work with apache as the server on windows XP. 
Anyone have any experience with that? Or point me to correct forum 
is this is the wrong one... thanks.
Chris
18-Feb-2005
[443]
Hmm, I don't fully recall setting up Apache, but I also don't think 
that I needed to change the registry to get it running...
Carl
18-Feb-2005
[444]
Yes... that's what I was going to say too. I just "worked".  But 
that was on Win2000.
Chris
18-Feb-2005
[445]
I installed it on WinME and it survived the XP upgrade.
Tim
19-Feb-2005
[446]
The trick for me is to reconcile the she-bang line, not only for 
different servers and OSs *but* also with different scripting languages. 
 Using one she-bang line on the test machine and a different one 
on a live server is full of potential errors, regardless of the language. 
On apache/windows the following line being enabled: "ScriptInterpreterSource 
registry" tells apache/windows to find an association in the registry. 
Well, there is no rebol/core installation procedure to do it, and 
the registry entry appears to be different from windows 98/IIS, and 
I haven't been able to figure it out. I need to be able to run scripts 
from rebol, python and perl on this machine *and* to be able to upload 
any of them to a unix/linux server. so ..... I installed rebol and 
user.r in c:\usr\bin, installed python at   d:\python23 *and* copied 
python.exe to c:\usr\bin. So far rebol and python are both working 
using #!/usr/bin/rebol and #!/usr/bin/python respectively as the 
she-bang lines (with ScriptInterperterSource turned off). I will 
later try that with perl and see what happens. If that works, then 
I have a solution. However,  it seems to me that the rebol installation 
should provide proper registry entries to by-pass the she-bang line 
as perl and python do.
Sunanda
19-Feb-2005
[447]
Using one she-bang line on the test machine and a different one on 
a live server is full of potential errors,
That's true.

But using the *same* shebang in a collaberative development forces 
all developers to have the same setup. 


We sorted that in REBOL.org by having the custom uploader change 
the shebang to be correct for the upload destination.
Volker
19-Feb-2005
[448]
you can upload a test-script with that shebang and call it from rebol 
as part of the upload.
shadwolf
19-Feb-2005
[449x5]
no need to go to registry base to setup it
as in linux you have a http.conf file to edit
you need to set some little  options and that's all folks
you have a tool named apache monitor to start apache serv and to 
stop it or restart it :)
httpd.conf
Tim
19-Feb-2005
[454x2]
There would be no collaboration on this machine between rebol programmers. 
Two programmers, one using rebol and python (me), the other using 
perl. And of course we are using the same setup, because all scripts 
are being uploaded to any of a number of linux or sun system servers, 
all of which use the same convention: #!/usr/bin/[interpreter]. I 
fully understand Sunanda's approach, but in the case of rebol.org, 
there are many programmers working from multiple machines in multiple 
OSs. I think the the c:\usr\bin approach will work fine for our humble 
endeavor.
Having said that, I want to eventually study Sunanda's approach more, 
because I want to eventually set up a rebol-based system for uploading 
that will handle she-bangs *and* dependencies.

BTW: Rebol.org seems to be progressing very well. If progress continues, 
I envision something as sophisticated (and hopefully easier to use) 
as CPAN. Keep up the good work.
Sunanda
20-Feb-2005
[456]
Tim: A general purpose uploader would be very useful.

I'll drop you some notes privately on some ideas for what it should/could 
do.
Tim
21-Feb-2005
[457]
Sunanda: I quote you from another forum: Tim: A general purpose uploader 
would be very useful. I'll drop you some notes privately on some 
ideas for what it should/could do.....Looking forward to it! My idea 
is of a cgi upload script that for any cgi script, first checks a 
web site and compares timedate stamps, checking to make sure that 
dependencies are current and if not, makes them also available for 
upload. BTW: Some time ago on the rebol ML,

there was reference to an enhanced FTP module. Does that ring a bell? 
<grin> or was that you?