1

I have a requirement to handle an application that is POSTing XML to a server and port. Unfortunately it is not possible for me to specify a path from this application and no way for me to change it.

So in Wireshark I can see it POSTing to

http://10.0.126.11:8082   <--- note the lack of trailing slash

If I set a test POST as follows in wfetch, I can route it just fine in grails. The following is what shows in Wireshare:

http://10.0.126.11:8082/   <--- trailing slash

I have the grails setup to route setup for the root path "/" in the UrlMappings and have setup the grails.app.context = "/" in the Config.groovy. Note that things just go badly if these are set to empty string.

Is there a way to go a step above the root path and respond to anything on the server:port? Can Grails respond to a request without a path?

This is the situation I'm trying to handle when recreating with wfetch (note that there is no path): enter image description here

Scott
  • 16,711
  • 14
  • 75
  • 120
  • Instead of posting directly to Grails, can you intercept calls to `http://10.0.126.11:8082` and forward to `http://10.0.126.11:8082/` using a proxy or perhaps a router-level rule? – raffian Oct 09 '13 at 20:37
  • @raffian, ya had thought of doing it that way but it seemed that I'd have to write some kind of proxy, that I was hoping to not have to do for a POC. Do you know of any quick and dirty ways I could set up? – Scott Oct 09 '13 at 20:49
  • Check out nginx and other related http proxies, you don't have to implement one! – raffian Oct 09 '13 at 21:12
  • Good call, it looks like this could be a possible solution http://stackoverflow.com/a/3792053/311525 – Scott Oct 09 '13 at 21:15
  • Yeah, you'll have to play with the rewrite syntax, but I suspect it will work, good luck – raffian Oct 09 '13 at 21:56

0 Answers0