> Hello public-cdf,
>
> I'm happy to announce that Doug Schepers is now the W3C Staff
> Contact for the CDF Working Group.
>
http://www.w3.org/People/all#schepers>
Hi Doug.
May I respond to this excellent news directly with a request? For
some WICD testcases (accept-header identification, play animations
while document is loading, etc.) we need a bit of serverside logic,
to be hosted on a w3c server. I have created a very small (750 bytes
text), but fully self-contained ruby servlet script (attached) for
this purpose. It is preconfigured to run on port 8002. An instance of
this servlet does currently run here:
http://timur.mobi:8002/ (for
test purposes only).
As you can see, it always returns all the HTTP request headers in
plain text. Very simple.
You run the servlet like this: nohup ruby httpreq.rb >httpreq.log&
"httpreq" requires "Ruby" to be installed. If necessary, "Ruby" can
be installed this way: apt-get install ruby
I don't know why this is, but today, I don't seem to be able to
access the W3 CVS server ("lionel-hutz.w3.org: Connection refused").
I wanted to add/commit this servlet to the WICD test-suite. I'll do
that later.
Greets,
Timur
[httpreq.rb]
#!/usr/local/bin/ruby
#
# "/httpreq" Servlet for WICD 1.0 testsuite
# Author: timur.mehrvarz@... Vodafone Group Services
port = 8002
require "webrick"
include WEBrick
class BasicServlet < WEBrick::HTTPServlet::AbstractServlet
def do_GET(request, response)
response['Cache-Control'] = "no-store" # HTTP 1.1
response['Pragma'] = "no-cache" # HTTP 1.0
response.status, response['Content-Type'], response.body = process(request)
end
def process(request)
respBody = ""
0.upto(20) {|i| respBody<<request.raw_header[i] if request.raw_header[i] }
return 200, "text/plain", respBody
end
end
httpreq = HTTPServer.new(:Port => port)
httpreq.mount("/", BasicServlet)
trap("INT"){ httpreq.shutdown }
httpreq.start