Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

url restrictions

 [1/10] from: sags::apollo::lv at: 15-Jan-2005 23:48


Hi, Rebolers! What exactly restrictions are on chars in urls? I tried to read following url, that browsers normaly read: http://127.0.0.1/cgi- bin/mapserv.exe?mode=map&layer=airports&layer=cities&layer=lakesp y2&layer=dlgstln2&layer=roads&layer=twprgpy3&layer=drgs&zoomdir=- 1&zoomsize=2&imgxy=299.5+299.5&imgext=446093.952280+5227217.18686 3+460192.540358+5241312.419027&map=c%3A%5Cworkshop%5Citasca.map&r oot=..%2Fmaps&savequery=true&program=%2Fcgi- bin%2Fmapserv.exe&map_web_imagepath=c%3A%5Cwww%5Croot%5Ctmp%5C&ma p_web_imageurl=%2Ftmp%2F&map_web_template=itasca_basic.html&img.x =360&img.y=193 Getting error: ** User Error: URL error: Janeks

 [2/10] from: SunandaDH:aol at: 15-Jan-2005 18:46


Janeks:
> Getting error: > ** User Error: URL error:
When I tried it on my machine, I got a 404 not found -- so the URL looks okay, but obviously it doesn't exist on my local machine. Do make sure you don't have any inadvertent line breaks in the URL Sunanda.

 [3/10] from: ingo:2b1 at: 16-Jan-2005 12:33


Hi Janeks, I don't know the restrictions on url!s, but I know what zou could do about it, use it like this ...
>> read to url! "http://127.0.0.1/cgi-..."
that is, use a string and convert it explicitly to an url. I hope that helps, Ingo

 [4/10] from: ingo::2b1::de at: 16-Jan-2005 12:35


[SunandaDH--aol--com] wrote:
> Janeks: > >>Getting error: >> ** User Error: URL error: > > When I tried it on my machine, I got a 404 not found -- so the URL looks > okay, but obviously it doesn't exist on my local machine.
What versions do you use? I get the user error on REBOL/Core 2.5.7.4.2 (linux). Kind regards, Ingo

 [5/10] from: sags::apollo::lv at: 16-Jan-2005 15:09


Thanks! It helped but partly. That URL retrieves PNG (GIF, JPEG) image, that normaly appears in a browser window. In rebol script I used read response into a variable. And then display in a layout. First I tried to do it directly: myImg: read to-url "http://127.0.0.1/cgi..." mansLogs: layout [ text "Hello Rebol World!" button "Poga" toggle "Nospiest" "Atlaist" image myImg ] view mansLogs It worked but image place displays noisy characters, like if I tried to view image in a text editor. Then I tried to-image, but it ends with error: .... \|=E8=E2=89{|=9E=A1O=F8=A6vt=DC\=D6=93"x =F64=FF=85}=8D?=E1=ECik=E8=AF=B2=A7=FC(V=AA=E9=C8=8FF =CC=A6K=CC=90`=FAs=AF=82I3=AB=8A=EF4=FEg=A8=D3=E3 =A9 =B1 =FA =B7 % P =E2 =ED u =AE ' F =BB U =9B .. .. .. \ | =E8 =E2 =89 { | =9E =A1 O =F8 =A6 v t =DC \ =D6 =93 x =F6 4 =FF =85 } =8D ? =E1 =EC i k =E8 =AF =B2 =A7 =FC ( V =AA =E9 =C8 =8F F =CC =A6 K =CC =90 ` =FA s =AF =82 I 3 =AB =8A =EF 4 =FE g =A8 =D3 =E3 =A9=B1=FA=B7%P=E2=ED =CFl=C8 =FF=D9 ** Where: to-image ** Near: to image! :value It seems, that Rebol does not understands, that it is an image? What else solutions there could help? Janeks On 16 Jan 2005 at 12:33, Ingo Hohmann wrote:

 [6/10] from: andreas:bolka:gmx at: 16-Jan-2005 14:37


Sunday, January 16, 2005, 2:09:40 PM, sags wrote:
> It helped but partly. That URL retrieves PNG (GIF, JPEG) image, > that=20 normaly appears in a browser window. In rebol script I used > read response into a variable. And then display in a layout. First I > tried to do it directly: > myImg: read to-url "http://127.0.0.1/cgi..."
try using read/binary instead. -- Best regards, Andreas

 [7/10] from: sags:apollo:lv at: 16-Jan-2005 16:28


Uups... forgot about /binary! Anyway helped partly... Now I can get image displayed in the layout, but it is no the image that I got in the web browser. And diferent versions reacts(1.2.46.31 and 1.2.1.3.1) differently: first gives something similar colors pixels, but second completely black image. The situation above is so in case, when I use in layout defs: image to-image myImg If I use directly "image myImg" , then in v.1.2.46.31 I am geting blank image and message in console: Unrecognized parameter: #{474946383761} In v.1.2.1.3.1. I am getting the same black image, but with blue upper edge and no messages in conslole. I tried to save image to disk and then check/show it, in that case it appears as it should. ??? plz help Janeks On 16 Jan 2005 at 14:37, Andreas Bolka wrote:

 [8/10] from: sags:apollo:lv at: 16-Jan-2005 22:03


I tried different modifications of code: myImg: http://127.0.0.1/cgi-bin/cgi.exe?with= a lot of parameters that returns an image mansLogs: layout [ image 200x200 myImg ] view mansLogs All worked fine if I used url reference to image files, also saving from cgi.exe to file worked well, but with such url like above there was errors or bugs. Finaly my conclusions is that Rebview does not like such urls, why I don't know... Probably someone of Rebol gurus could explain or provide a trick, how to manage without saving to a file ... !? brgds Janeks On 16 Jan 2005 at 16:28, [sags--apollo--lv] wrote:

 [9/10] from: antonr:lexicon at: 17-Jan-2005 19:20


Hi Janeks, Can you send me the image, zipped, along with the exact corresponding url that successfully shows it in the browser ? I can analyse it then. Anton.

 [10/10] from: gabriele:colellachiara at: 17-Jan-2005 11:39


Hi sags, On Sunday, January 16, 2005, 9:03:44 PM, you wrote: sal> I tried different modifications of code: [...] img: to-image read/binary ... will not work. That's not how you're supposed to load an image; you'll need to use LOAD instead; so either: img: load ... or just supplying the URL to the IMAGE style, that will take care of loading it. You can still use TO-URL if you have a problem with the URL itself, but usually it's an URL encoding issue. (I.e. those %XX encoded characters.) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/