Florian Obser wrote :
> On Sun, Nov 23, 2014 at 08:15:47PM -0500, Bertrand Janin wrote:
> > Hi,
> > 
> > This patch updates server_abort_http() to only send the body of default http
> > error if the method is not HEAD. I first noticed that with curl -v -I which
> > complains about the excess data:
> > 
> >     * Excess found in a non pipelined read: excess = 397 url = /asd 
> > (zero-length body)
> 
> Nice catch. However, your diff will leak body if the second
> asprintf(3) fails.
> Since we are probably not supposed to send a "Content-Type" header I
> think it makes sense to duplicate the httpmsg generating code in this
> case; it feels easier.
> While in there nuke unneeded text variable and shuffle variable
> declarations around.

Indeed, that's much better.

-b

Reply via email to