wlstks7 / interactive-spaces

Automatically exported from code.google.com/p/interactive-spaces
Other
0 stars 0 forks source link

cannot serve files with spaces in filename #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an Activity that extends BaseWebActivity
2. in the webapp directory, place an image with spaces in the name such as "my 
cool image.jpg"
3. use a config file like the following:
"
port=6543

space.activity.type=interactivespaces_native
space.activity.executable=spacetest-0.0.1.jar

space.activity.name=imageTile

space.activity.log.level=info
space.activity.java.class=spacetest.SimpleJavaActivity

space.activity.webapp.content.location=webapp
space.activity.webapp.web.server.port=${port}
space.activity.webapp.url.initial=my cool image.jpg
space.activity.webapp.url.query_string=
space.activity.webapp.browser.debug=true

space.activity.log.level=info
"
4. startup the live activity

What is the expected output? What do you see instead?
expected: a browser opens and the image 'my cool image.png' displays
instead: the browser attempt to open "http://localhost:6543/imageTile/my" and 
shows "Failure: 404 Not Found"

in addition, if you change the space.activity.webapp.url.initial value to 
my%20cool%20image.jpg the browser will attempt to open 
"http://localhost:6543/imageTile/my%20cool%20image.jpg?" but still show 
"Failure: 404 Not Found"

if you change both the name of the jpg file in the filesystem and the conf file 
to my_cool_image.jpg, then it will load as expected.

so it seems like this may be two issues? one relating to spaces in the initial 
URL used to start up chrome, and the other relating to Netty serving up files 
with spaces in the name.

What version of the product are you using? On what operating system?
1.3.1, OSX 10.7.5

Please provide any additional information below.

Original issue reported on code.google.com by quinkenn...@gmail.com on 22 Jan 2013 at 8:59

GoogleCodeExporter commented 9 years ago
Looking into.

You should have a proper URL in the activity.conf, so don't use

space.activity.webapp.url.initial=my cool image.jpg

rather

space.activity.webapp.url.initial=my%20cool%20image.jpg

Browsers act as browsers do, I cannot make the browser work differently. :-)

Original comment by khug...@google.com on 29 Jan 2013 at 8:19

GoogleCodeExporter commented 9 years ago
I will fix this as it is an issue, but I do question why spaces have to be used 
in filenames. I tend to leave them out because different programs cannot handle 
them properly and camelcasing or underscores can separate words in a filename.

Original comment by khug...@google.com on 29 Jan 2013 at 8:30