• Poul-Henning Kamp's avatar
    One of the silly overgeneralizations in RFC2616, is that headers which · 653d3912
    Poul-Henning Kamp authored
    contain comma-separated lists, can be spread over multiple header
    lines.
    
    There is no way of knowing if this rule applies to any header not
    in RFC2616, short of chasing down the relevant standards document,
    if any, for the particular header.
     
    Considering the fact that HTTP header lines have no natural
    limitation on length AND that RFC2616 already specifies a mechanism
    for header-continuation, this doesn't add any value, at all.
     
    It is hardly a surprise that nobody used this either, so until now,
    we have ignored this silly stuff and just used the first header we
    found.
     
    But now Chromium, of all things, seems to find it necessary to
    spread its Cache-Control across two lines, and we get to deal
    with this crap.
     
    Add a function for stitching multiple header lines into one, and
    call it on Cache-Control in requests to deal with Chromiums issues.
    
    Since we have it, call it preemptively on Cache-Control and Vary
    in backend responses, since the C-code examines these fields.
    
    XXX: At some point, add VCL support for collecting specific headers
    this way.
    
    Fixes: #686
    
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5531 d4fa192b-c00b-0410-8231-f00ffab90ce4
    653d3912
cache_center.c 31.5 KB