x


Max String Length in WWW url's?

I realize there are limitations to GET send's, but what if the URL you are fetching from itself is too long?

I am trying to fetch a series of images that have format similar to:

http://wsdds3-01.dz.sv.decartahws.com/openls/image/TILE?LLMIN=37.763899999640000000,-122.402155387007640000&LLMAX=37.764620000360000000,-122.401244612992370000&WIDTH=256&HEIGHT=256&FORMAT=GIF&CLIENTNAME=livepages&SESSIONID=999&CONFIG=global-decarta&N=0&E=0

If you copy and paste that long url in the browser, an image loads...

However, when I try loading the url above into a cube in the below common code from the WWW example, the missing texture questionmark shows.

var www : WWW = new WWW (url);

// Wait for download to complete
yield www;

// assign texture
renderer.material.mainTexture = www.texture; 

Please help!

more ▼

asked Aug 30 '11 at 06:14 AM

ina gravatar image

ina
3.3k 492 549 599

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I believe you're not facing an url length issue, but a cookie/ referrer one. Quite possibly, the site requires:

1- that the referrer be itself

2- that there's a cookie in your browser related to the site

I'm in fact pretty sure that if you print the url of your www object, it'll be exactly as you typed it. Unfortunately there's not much you can do in the first case (other than using a complete url agent, which I unfortunately don't know to exist for unity). In the second case you can create or fake the cookie, that you feed to unity's www explorer <= have no idea how to achieve this, if at all possible.

more ▼

answered Aug 30 '11 at 01:50 PM

roamcel gravatar image

roamcel
1.2k 37 40 44

hmm if you could access that image by clicking that link... without having been authenticated, it seems it is not a cookie issue?

Aug 31 '11 at 07:23 AM ina

in either case, if the session times out, the image shown looks different - and it's not the missing texture red question mark... here's the timed out image http://wsdds3-01.dz.sv.decartahws.com/openls/image/TILE?LLMIN=

Aug 31 '11 at 07:41 AM ina

it appears to be only PNG and JPG accepted - the URL above is a GIF.

Aug 31 '11 at 07:51 AM ina

TILE in the URL indicates a SCRIPT. The script is responsible for the session and cookie management. The very fact that you access it will run its code. The fact that you receive an image is just a 'cohincidence'. If the script was designed differently, you could receive an audio clip, or an html page generated dynamically.

Aug 31 '11 at 09:07 AM roamcel
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x525
x419
x150
x54
x28

asked: Aug 30 '11 at 06:14 AM

Seen: 1196 times

Last Updated: Aug 31 '11 at 09:07 AM