• David Woodhouse's avatar
    http: Retry request (once) on error receiving response · 01ef9ea9
    David Woodhouse authored
    A Juniper server has been encountered in the wild which sends an initial
    302 redirect without Connection:close, but then just closes the connection
    when it receives the next request.
    
    This happens only for the first redirect to /dana-na/auth/… and not for
    subsequent redirects through cookie-check and realm stuff. So instead of
    a preemptive hack to avoid connection reuse for *all* redirects in NC,
    just cope with it when it happens.
    
    Since rq_retry is only set when the connection is already open, it won't
    get set again the second time round, thus avoiding endless retries.
    
    Fixes: #96
    Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
    01ef9ea9