You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/11/21 18:14:31 UTC

[GitHub] rawlinp opened a new pull request #3052: [Backport] Prevent Perl input record separator change in TO dbdump API

rawlinp opened a new pull request #3052: [Backport] Prevent Perl input record separator change in TO dbdump API
URL: https://github.com/apache/trafficcontrol/pull/3052
 
 
   Due to the way this code was previously written, the first call to the
   dbdump API is successful, but subsequent calls are broken because the
   chomp() function no longer strips trailing whitespace from the output of
   the `hostname` command. This ends up breaking the response headers
   because of the unexpected newline, causing traffic_ops_golang to emit
   this error and return a 502:
   
       http: proxy error: net/http: HTTP/1.x transport connection broken:
       malformed MIME header line: -20181031125221.pg_dump"
   
   By only locally declaring $/ (undefined), subsequent calls to `chomp()`
   actually strip newlines because `$/ == "\n"` by default.
   
   (cherry picked from commit 612bedd89c31e3e0187705411a1ffb281cf453bf)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services