• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by ina · Aug 30, 2011 at 06:14 AM · wwwstringdataurlbinary

Max String Length in WWW url's?

I realize there are limitations to GET send's, but what if the URL you are fetc$$anonymous$$ng 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!

Comment

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by roamcel · Aug 30, 2011 at 01:50 PM

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, w$$anonymous$$ch 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

Comment

People who like this

0 Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ina · Aug 31, 2011 at 07:23 AM 0
Share

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

avatar image ina · Aug 31, 2011 at 07:41 AM 0
Share

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=

avatar image ina · Aug 31, 2011 at 07:51 AM 0
Share

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

avatar image roamcel · Aug 31, 2011 at 09:07 AM 0
Share

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.

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

WWW & and strings in C# 1 Answer

is it possible to get the url from a webpage? 1 Answer

Retrieving something from the web? 1 Answer

Streaming Assets android 0 Answers

Getting text from a website file and storing it in a variable 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges