Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] HttpGenerator: Ignore extra content

The HttpGenerator message ("Ignoring extra content") is produced when
more content is written after the response is complete. It doesn't
directly have anything to do with the PrintWriter.setError() method.
I'd turn up logging on jetty and any libraries you're using to debug
level to see what is going on.

Jan

On 11 June 2012 15:20, Srinivasa Yellapu <srinivasaven@xxxxxxxxx> wrote:
> Hi,
> i am developing a webapplication which uses dwr for push mechanism. i
> observe the PrintWriter object in HttpServletResponse is getting set with an
> error.
> Logic:
> *dwr's custom flush method:*
> PrintWriter out = reponse.getWriter();
> public boolean flush() {
>  out.flush();
>  if (out.checkError()) {
>   /* Error occurred while sending the response, so resend the response in
> the next push */
>   return false;
>  }
>  /* response sent successfully */
>  return true;
> }
>
> *The strange thing is that even though PrintWriter with error successfully
> sends response to client side, since in the above code out.checkError() will
> return true, response will be resent to client.*
>
> On further observation i found that the following statement getting logged
> everytime when this kind of misbehavior is there:
>   WARN:oejh.HttpGenerator:Ignoring extra content
>
>  This is dependent on browser type and this is happening in chrome, firefox
> and not in opera, IE.
>
> 1. Is this (HttpGenerator: Ignoring extra content) going update anything to
> PrintWriter ?
> 2. When PrintWriter sets error flag ?
> 3. How browsers response to this kind of response (HttpGenerator: Ignoring
> extra content) ?
>
> Please someone guide me to solve this issue.
>
> Thanks & Regards,
> Srinivasa Yellapu
>
> --
> View this message in context: http://jetty.4.n6.nabble.com/HttpGenerator-Ignore-extra-content-tp4958615.html
> Sent from the Jetty User mailing list archive at Nabble.com.
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users



-- 
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com – Developer advice, services and support
from the Jetty & CometD experts.


Back to the top