You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Aditya Sharma (JIRA)" <ji...@apache.org> on 2018/08/17 13:42:00 UTC

[jira] [Closed] (OFBIZ-10508) Remove checks to store only 250 characters of URL in VisitHandler.getVisit() & ServerHitBin.saveHit()

     [ https://issues.apache.org/jira/browse/OFBIZ-10508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aditya Sharma closed OFBIZ-10508.
---------------------------------

> Remove checks to store only 250 characters of URL in VisitHandler.getVisit() & ServerHitBin.saveHit()
> -----------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-10508
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10508
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk, Release Branch 17.12
>            Reporter: Aditya Sharma
>            Assignee: Aditya Sharma
>            Priority: Major
>             Fix For: 17.12.01, Upcoming Branch
>
>
> Found following checks to restrict "URL" fields for Visit and ServerHit entity:
> When storing ServerHit using ServerHitBin.saveHit() method
>  
> {code:java}
> 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);
> {code}
> When storing Visit using VisitHandler.getVisit() method
> {code:java}
> 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);
> if (initialUserAgent != null) visit.set("initialUserAgent", initialUserAgent.length() > 250 ? initialUserAgent.substring(0, 250) : initialUserAgent);
> {code}
> 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. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)