With the httpclient it's difficult to get if the HTTP status code was
returned by the actual server or if it's the internal proxy that
generate the error.
This patch changes the behavior by setting the status to 0 when an error
is get by the stream.
There were already valid cases when the status was 0 on some error, so
that should not really change the error path in the scripts.
/* copy the status line in the httpclient */
hc->res.status = sl->info.res.status;
+
+ if (__sc_strm(appctx_sc(appctx))->flags & SF_ERR_MASK)
+ hc->res.status = 0;
+
hc->res.vsn = istdup(htx_sl_res_vsn(sl));
hc->res.reason = istdup(htx_sl_res_reason(sl));
htx_remove_blk(htx, blk);