Skip to content

Commit

Permalink
When tracking request is > 2000 char, prefer POST (#11201)
Browse files Browse the repository at this point in the history
* fixes #2321 when tracking request is > 2000 char, prefer POST

* Fix jslint
  • Loading branch information
tsteur authored and mattab committed Jan 17, 2017
1 parent d807689 commit 6c0e31b
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' || String(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 6c0e31b

Please sign in to comment.