From: jeljer te Wies Date: 2010-02-13T17:56:12+09:00 Subject: Re: how to detect used protocol (SOAP, JSON, XML etc.) Hassan Schroeder wrote: > On Fri, Feb 12, 2010 at 2:22 AM, jeljer te Wies wrote: > >> I am building an ESB (Enterprise Service Bus) for a Content Management >> System. >> >> The esb (as you probably know) should be able to handle multiple >> protocols (JSON, XML, SOAP). >> So it has a tcp socket and it gets a "request". >> >> The problem is that I can't figure out how to check what protocol is >> used. > > If all these "protocols" are being delivered over HTTP, you can look > at the "Accept" header. Read RFC2616 for details... > > HTH, Hmm no it isn't :( mostly they are send with just a tcp connection.) Only the browsers who request a webpage are using (of course HTTP). the other servers who want to talk with the esb have all different protocols. (on TCP i mean) But i will look more closely to the RFC's they can be useful :P thanxs !! :) appreciated -- Posted via http://www.ruby-forum.com/.