Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Fix improper file slurping in Perl#3143

Merged
dangogh merged 1 commit intoapache:masterfrom
rawlinp:fix-null-input-record-sep
Dec 18, 2018
Merged

Fix improper file slurping in Perl#3143
dangogh merged 1 commit intoapache:masterfrom
rawlinp:fix-null-input-record-sep

Conversation

@rawlinp
Copy link
Contributor

@rawlinp rawlinp commented Dec 18, 2018

What does this PR do?

The proper way to enable slurp mode is by doing local $/;. When you do
undef $/ it is undefining the global $/ input record separator which
is bad and can cause a multitude of problems. Using the local version
only nullifies the input record separator locally in order to enable
slurp mode in that particular function rather than changing it globally.

Which TC components are affected by this PR?

  • Documentation
  • Grove
  • Traffic Analytics
  • Traffic Monitor
  • Traffic Ops
  • Traffic Ops ORT
  • Traffic Portal
  • Traffic Router
  • Traffic Stats
  • Traffic Vault
  • Other _________

What is the best way to verify this PR?

Hit the POST /api/$version/isos?stream=yes endpoint. This can be done in Traffic Portal, just make sure to set stream=yes in order to hit the changed code. I'm not sure how to really verify parse_retention_period_in_seconds since I can't find anywhere in the code that actually uses that function. The GenDbDump change isn't really verifiable anymore since it's a UI endpoint, but this should cover our bases in case it is being used in some obscure way by a non-UI endpoint.

Check all that apply

  • This PR includes tests
  • This PR includes documentation updates
  • This PR includes an update to CHANGELOG.md
  • This PR includes all required license headers
  • This PR includes a database migration (ensure that migration sequence is correct)
  • This PR fixes a serious security flaw. Read more: www.apache.org/security

The proper way to enable slurp mode is by doing `local $/;`. When you do
`undef $/` it is undefining the global `$/` input record separator which
is bad and can cause a multitude of problems. Using the `local` version
only nullifies the input record separator locally in order to enable
slurp mode in that particular function rather than changing it globally.
@rawlinp rawlinp added bug something isn't working as intended Traffic Ops related to Traffic Ops labels Dec 18, 2018
@asfgit
Copy link
Contributor

asfgit commented Dec 18, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2973/
Test FAILed.

@dangogh dangogh merged commit bbf8beb into apache:master Dec 18, 2018
@rawlinp rawlinp deleted the fix-null-input-record-sep branch December 18, 2018 23:33
jranson added a commit to jranson/trafficcontrol that referenced this pull request Jan 25, 2019
Revert changes in vendor

Fix syntax error in goose migration

DELETE COLUMN should be DROP COLUMN.

v4 - now identifies order-only diffs (apache#3121)

Fixed a Python2 compatibility issue in the Traffic Control client (apache#3115)

* Fixed an issue where Python3-specific syntax was used

Fix implemented using pre-existing 'future' dependency - `future.utils.raise_from`.

* Removed trailing whitespace and ANSI control characters

I also took the opportunity to fix a couple of URLs in areas where the control characters got left in.
Another PR will need to address the fact that those are all wrong since the overhaul

Removed unnecessary http-parser dependency (apache#3126)

Fix TO CRConfig tm.url to be fdqn, not uri

Add Traffic Vault steps for Self Signed SSL (apache#3122)

* TrafficVault update docs for Self Signed SSL

lock TP dependency (apache#3132)

Python client Package restructure (apache#3130)

Restructures the Python Traffic Control client into a real package - without links
. Also includes real documentation linking, real contact info for the package, and
adds missing endpoint references/fixes old/deprecated/broken ones, removed a couple
of duplicated endpoint methods and fixes some poorly-formatted reference labels in
the API documentation.

Updated documentation for the new Go db/admin binary (apache#3128)

Also, fix some code-block syntax errors so that they actually show up in
the documentation.

Configuration file route generation script now works with restructured ATC client (apache#3142)

Fix improper file slurping in Perl (apache#3143)

The proper way to enable slurp mode is by doing `local $/;`. When you do
`undef $/` it is undefining the global `$/` input record separator which
is bad and can cause a multitude of problems. Using the `local` version
only nullifies the input record separator locally in order to enable
slurp mode in that particular function rather than changing it globally.

Fix TO query for crconfig column rename (apache#3137)

Fixes apache#3136

Add additional response code information in responder.go. (apache#3141)

This would help with issue 3139.

fix builder Dockerfiles (apache#3152)

Added documentation guidelines (apache#3133)

also fixed a label that was in conflict with said guidelines, provided cursor hints for abbreviations and
removed a warning about building the docs with Python 3.7+ (related bug is now fixed).

Added a configuration setting, 'DisableHTTP2'.  The setting (apache#3149)

is false by default but when set to 'true', the grove server
will not negotiate and serve HTTP2.

Added an explanation of the format and structure of API endpoint docs

implemented proper text roles for RFC and mimetypes

Fix method call due to false positive from `misspell`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants