On Mon, Jun 19, 2006 at 07:20:04PM -0700, Steve Holmes wrote: > On Tue, Jun 20, 2006 at 01:41:58AM +0000, Miciah Dashiel Butler Masters wrote: > > ELinks is converting that argument to a URI, which process encodes the > > question mark and ampersands. In fact, don't you get a file-not-found > > error? Try providing a URI: > > > > elinks 'file:///home/me/cgi-bin/printenv.cgi?value1&value2' > > Very interesting indeed. I tried using the whole path (with my own name > of course) and it worked! I got a populated QUERY_STRING and some > debugging stuff I added at the bottom using the CGI perl module started > working too. I originally was using just 'cgi-bin/printenv?blabla' > without the tick marks and I found the script ok but I had the problems > previously noted. I thought the cgi-path was supposed to help without > having to spell out the entire path of the original script. May that > path comes in if I specify the name on a form action attribute or > something. Anyway, this answer from you gets me past this herdle. > > Now on to some real CGI programming:). I messed with php some before > but the neet thing about this CGI deal is I can run some full screen > apps without having to run the apache server on this box and I don't > have to master curses or any of that; just some good ol' simple console > apps with workable forms. Gee, I could maybe even slip in some > javascript:). But then again, I don't know javascript yet:). > > Anyhow, thanks again for the reply; this may do the trick.
ELinks has to decide whether the arguments that are provided on the command line are regular paths or whether they are URIs. The heuristic is that if it parses as a URI, it is a URI; else, assume that it is a path and convert it to a URI. This conversion requires that special characters be encoded. Filenames can contain question marks, but the user might also mean question marks to mark query strings. The compromise in ELinks is simple, predictable, and usually intuitive (I think). We could do some fancy guesswork, checking whether the path up to the question mark identifies an existent file or whether the path including the question mark and the text after identifies an existent file, which might make it more intuitive (for some people) but would certainly diminish the predictability and simplicity. You can still use a relative path with a URI: elinks file:./public_html/cgi-bin/printenv?blabla HTH, -- Miciah Masters <[EMAIL PROTECTED]> / <[EMAIL PROTECTED]> _______________________________________________ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users