On Tue, 3 Apr 2007 20:49:02 -0400, Jesse Kuhnert wrote > You can still do HttpServletResponse.setStatus(int code, String > message); > > It's deprecated so there may be a better way but who knows..It > wouldn't make sense if they didn't let you do it. >
I think the setStatus() will only affect the "200 OK" part, not the "HTTP/1.1" part of the status line. But thanks for the reaction anyway. Hans Drexler > On 4/3/07, Hans Drexler <[EMAIL PROTECTED]> wrote: > > On Tue, 03 Apr 2007 14:11:03 +0100, Richard Kirby wrote > > > Hi Hans, > > > > > > The status line is output by the servlet engine - not Tapestry, > > > since it is a core part of the HTTP spec. > > > > > > What you may be able to do, is create a javax.servlet.Filter which > > > reads the response from Tapestry into a stream, hopefully including > > > the status line - and then just re-output but with your new status > > > line. Don't know if that will work though. > > > > > > Richard. > > > > > > > I already had a hunch that it would be something like this. Thanks for the > > response. I will try to construct a filter. Never did that before, so it > > will > > be a challenge :-) > > > > > Hans Drexler wrote: > > > > We try to create a Tapestry-service that generates a Shoutcast stream. > > > > The > > > > problem is that the shoutcast response must have a status line that > > > > reads: > > > > > > > > ICY 200 OK > > > > > > > > Instead, the status line we get is always: > > > > > > > > HTTP/1.1 200 OK > > > > > > > > Many mediaplayers (WinAmp, Xmms, iTunes) accept the header with HTTP status > > > > line, but some do not. The ICY header is incorrect according to RFC 2616 and I > > > > have been unable to generate a response with this status line. > > > > > > > > Does somebody have a clue on how we could spit out a response with the > > > > ICY > > > > like status line in it? Any help is appreciated. > > > > > > > > > > > > > > > > The code we use now is basically like this: > > > > > > > > private WebResponse _response; > > > > > > > > [...] > > > > > > > > private OutputStream initOutputStream(boolean metadata) throws IOException { > > > > OutputStream out = _response.getOutputStream(new ContentType("audio/mpeg")); > > > > > > > > //Spit out Shoutcast-headers. > > > > _response.setHeader("icy-notice1","<BR>This stream requires > > > > <a > > > > href=\"http://www.winamp.com/\">Winamp</a><BR>"); > > > > _response.setHeader("icy-notice1","MusiController > > > > SHOUTcast-implementation<BR>"); > > > > _response.setHeader("icy-name","MusiController"); > > > > _response.setHeader("icy-genre","All sorts"); > > > > _response.setHeader("icy-url","http://musicontroller.sourceforge.net"); > > > > _response.setHeader("icy-pub","1"); > > > > _response.setHeader("icy-br","192"); > > > > if (metadata) _response.setIntHeader("icy-metaint",BUFFER_SIZE); > > > > > > > > log.debug("Outputstream initialized"); > > > > > > > > return out; > > > > } > > > > [...] > > > > > > > > public void setResponse(WebResponse response) { > > > > _response = response; > > > > } > > > > > > > > > > > > ---- > > > > Hans Drexler > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > ---- > > Hans Drexler > > GeoTax en WOZ-Support b.v. > > e: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > Jesse Kuhnert > Tapestry/Dojo team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]