google-code-export / appengine-jruby

Automatically exported from code.google.com/p/appengine-jruby
0 stars 0 forks source link

MalformedURLException when generating configuration on an app redefining open() #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Write a small application including a redefinition of open()

   def open(url, options)
     AppEngine::URLFetch.fetch(url)
   end

2. Try to start dev_appserver.rb

What is the expected output? What do you see instead?
Instead of a running development server you'll get a MalformedURLException, 
see the full stacktrace in the attached file. 

What version of the product are you using? On what operating system?
0.0.2 on Windows Vista 64Bit

Please provide any additional information below.
I used the redefinition of open() to workaround Google's restrictions using 
an existing library which uses open().

Attention! This does only happen when your configuration is generated. If 
you have an existing configuration you can use the redefinition like 
expected. This required quite some time to find out. I'm pretty sure this 
is because open() is used when generating the configuration. So maybe this 
is a WontFix, but maybe there's a way to run the app inside some sort of 
sandbox. Don't know exactly.

Original issue reported on code.google.com by koraktor on 23 Aug 2009 at 10:30

Attachments:

GoogleCodeExporter commented 9 years ago
Can you use open-uri instead?

Original comment by rib...@gmail.com on 26 Aug 2009 at 9:54

GoogleCodeExporter commented 9 years ago
Using open-uri should solve this.

Original comment by rib...@gmail.com on 29 Sep 2009 at 12:27