[undertow-dev] transfer-encoding vs content-length with small response

Stuart Douglas sdouglas at redhat.com
Wed Feb 18 21:42:30 EST 2015


Its not exactly forbidden, although it is not really required either. I will look at changing Undertow to not send this when it is not required. 

Stuart

----- Original Message -----
> From: "Edgar Espina" <espina.edgar at gmail.com>
> To: "Stuart Douglas" <sdouglas at redhat.com>
> Cc: undertow-dev at lists.jboss.org
> Sent: Thursday, 19 February, 2015 8:56:18 AM
> Subject: Re: [undertow-dev] transfer-encoding vs content-length with small response
> 
> Thank you, Stuart.
> 
> I do have a related question: should a 304 response set a Content-Length:
> 0? Don't think so, right?
> 
> Today, Undertow set a content-length of 0 on 304 responses.
> 
> On Mon, Feb 16, 2015 at 12:29 AM, Stuart Douglas <sdouglas at redhat.com>
> wrote:
> 
> > This is indeed a bug, however it should have been fixed as part of
> > https://issues.jboss.org/browse/UNDERTOW-180.
> >
> > Looking at the code it appears that AsyncSenderImpl also has this issue, I
> > will fix it up (https://issues.jboss.org/browse/UNDERTOW-385).
> >
> > Stuart
> >
> > ----- Original Message -----
> > > From: "Edgar Espina" <espina.edgar at gmail.com>
> > > To: undertow-dev at lists.jboss.org
> > > Sent: Tuesday, 10 February, 2015 10:36:20 PM
> > > Subject: [undertow-dev] transfer-encoding vs content-length with small
> >       response
> > >
> > > Hi,
> > >
> > > I know that Undertow figure it out a content-length or transfer-encoding
> > > header when none of them was set. That's good and it works as expected.
> > >
> > > It seems to be a problem when you explicitly set the "Transfer-Encoding"
> > > header bc Undertow, still add the Content-Length (on small responses?)
> > but
> > > it doesn't remove the Transfer-Encoding header.
> > >
> > > On such cases, the response contains both headers, which I think it's
> > wrong,
> > > no?
> > >
> > > --
> > > edgar
> > >
> > > _______________________________________________
> > > undertow-dev mailing list
> > > undertow-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/undertow-dev
> >
> 
> 
> 
> --
> edgar
> 


More information about the undertow-dev mailing list