myexperiment-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Myexperiment-discuss] Proxy implementation and testing


From: Linde, A.E.
Subject: [Myexperiment-discuss] Proxy implementation and testing
Date: Wed, 15 Oct 2008 18:04:01 +0100

Long time I know but I’m finally getting around to implementing this. I’ve implemented the Don’s suggestion but it is only returning a blank file while testing.

I have a server which, addressed (or curl’ed) with http://localhost:8080/sac/mysac?metadata returns:

=====
@prefix dc:      <http://purl.org/dc/elements/1.1/> .

<http://localhost:8080/sac/mysac>
      dc:creator "Tony" ;
      dc:description "My SAC" .
=====

But using http://localhost:3000/proxy?uri=http://localhost:8080/sac/mysac?metadata returns a blank file, albeit one with the correct mime type (i’m asked by firefox to choose the app to open a file of type ‘text/rdf+n3’). Is there a problem in the send_data code:

    send_data(response.body, :type => response['content-type'],        :status => "#{response.code} #{response.message}")

*More importantly, is there any way to debug myExperiment while developing? In _javascript_ I can stick alert()s all over the place to see what variables are being delivered. Is there anything I can do inside the proxy_controller.rb code to see what the variables are up to?

Thanks,
Tony.


On 18/07/2008 11:32, "Don Cruickshank" <address@hidden> wrote:

Hi Tony,
 
We don’t have a proxy server in the myExperiment codebase, but I’ve just written one for your codebase.  I’ve attached an app/controllers/proxy_controller.rb file and also you’ll need to add something like the following to your config/routes.rb file:
 
  # proxy route
  map.connect 'proxy', :controller => 'proxy', :action ="" 'proxy'
 
Needless to say, I recommend you clamp down on the kinds of requests that you let the server process otherwise it’s a security nightmare!
 
Regards,
Don.
 

From: address@hidden [mailto:address@hidden] On Behalf Of Linde, A.E.
Sent: 18 July 2008 09:48
To: address@hidden
Subject: [Myexperiment-discuss] proxy server?


Hi all, I've got my _javascript_ library for skua additions to myexp drafted but now need to be able to make a call from the client-side _javascript_ to the REST-based SKUA service. Since this will inevitably be cross-domain, it needs to be via a proxy server which is part of the myexp code. Does such a function exist at the moment? If (as I assume) not, and I need to direct the skua call via, say, /proxy?url="" does anyone have a pointer to sample (pref copy & paste) code I can use?



Thanks,

Tony.



--
Tony Linde
Project Manager
Department of Physics & Astronomy
University of Leicester

reply via email to

[Prev in Thread] Current Thread [Next in Thread]