Details
Description
Found following checks to restrict "URL" fields for Visit and ServerHit entity:
When storing ServerHit using ServerHitBin.saveHit() method
serverHit.set("requestUrl", fullRequestUrl.length() > 250 ? fullRequestUrl.substring(0, 250) : fullRequestUrl); String referrerUrl = request.getHeader("Referer") != null ? request.getHeader("Referer") : ""; serverHit.set("referrerUrl", referrerUrl.length() > 250 ? referrerUrl.substring(0, 250) : referrerUrl);
When storing Visit using VisitHandler.getVisit() method
if (initialRequest != null) visit.set("initialRequest", initialRequest.length() > 250 ? initialRequest.substring(0, 250) : initialRequest); if (initialReferrer != null) visit.set("initialReferrer", initialReferrer.length() > 250 ? initialReferrer.substring(0, 250) : initialReferrer);
When the code was committed ( https://markmail.org/message/fgatg5qyeaibxjxk ) the "URL" field type had a size of 255 characters only which was later changed to 2000 characters ( https://markmail.org/message/anfree2nkyk3imln ).
So, the above code logic to restrict no of characters can be removed now.