From: "Iñaki Baz Castillo" Date: 2009-03-30T18:41:53+09:00 Subject: Re: Help with GServer 2009/3/30 Sudhi Kulkarni : > Hi, > > I have a requirement > > when user type http://localhost:8000/1.xml ... the server should return > 1.xml contents which is stored in server's local file system. > > I wrote ruby script using GServer library but in serve() function how do > I get the query_string basically I want to be able to get that the user > has requested 1.xml some how... I don't understand your problem. GServer is just a threaded TCP listener, it doesn't work at application level (as an HTTP server does). So the steps you should do are: 1) Start GServer. 2) For each *TCP* connection parse the TCP data and extract the first line to get the requested URL. 3) Do anything with it. But you should use something as Mongrel which allows this kind of stuf very easy and ellegant. -- Iñaki Baz Castillo