Skip to content

Commit

Permalink
fixes #2321 when tracking request is > 2000 char, prefer POST
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Jan 10, 2017
1 parent 22c931e commit b8866d2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/Tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function init()
ExceptionHandler::setUp();

Common::printDebug("Debug enabled - Input parameters: ");
Common::printDebug(var_export($_GET, true));
Common::printDebug(var_export($_GET + $_POST, true));
}
}

Expand Down
2 changes: 1 addition & 1 deletion js/piwik.js
Original file line number Diff line number Diff line change
Expand Up @@ -3528,7 +3528,7 @@ if (typeof window.Piwik !== 'object') {
function sendRequest(request, delay, callback) {
if (!configDoNotTrack && request) {
makeSureThereIsAGapAfterFirstTrackingRequestToPreventMultipleVisitorCreation(function () {
if (configRequestMethod === 'POST') {
if (configRequestMethod === 'POST' || (''+ request).length > 2000) {
sendXmlHttpRequest(request, callback);
} else {
getImage(request, callback);
Expand Down
2 changes: 1 addition & 1 deletion js/piwik.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion piwik.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8866d2

Please sign in to comment.