Github user mtorluemke commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafficcontrol/pull/786#discussion_r131968364
  
    --- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
    @@ -1623,9 +1623,7 @@ sub check_lwp_response_content_length {
        my $url           = $lwp_response->request->uri;
     
        if ( !defined($lwp_response->header('Content-Length')) ) {
    -           ( $log_level >> $panic_level ) && print $log_level_str . " $url 
did not return a Content-Length header!\n";
    -           exit;
    -           return 1;
    +           return 0; # Content-Length MAY be omitted per HTTP/1.1 RFC 
7230, and in fact MUST NOT be included with a 'Transfer-Encoding: Chunked' 
header, which MUST be accepted by clients.
    --- End diff --
    
    At one point in time, Traffic Ops was happily serving incomplete files 
(potential myriad of errors causing this), and ORT was happily writing them to 
disk, and telling ATS to apply this partial config. Most of the time, ATS would 
reject this partial config, as it was invalid, and keep running with the old 
config. At some point later, ATS would crash and be forced to load the config 
from disk, and would not start with this invalid config. So, this check was 
crucial in the stability of our overall CDN.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to