Getting Header overflow error from fastly with large cookies

Comments

3 comments

  • devforce

    FYI: This request always shows "Header overflow" and I cannot figure out why it would since the header sizes seem to be well below the limits...

    curl --cookie 'cfduid=ded62cb71b1de88e24e7893a992ee5a371463691148; optimizelyEndUserId=oeu1463695934969r0.16651758032862296; jsuid=3396753640; useSiteUrlRewrceemployee=false; sccGuestUID=d9039be8-d292-469e-bf8b-f1b4af10339f; pctrk=8ff2d3f2-a48d-4193-a425-e412eb69095b; wptouchcustomizermode=mobile; dfcfooteroptin={%22email%22:%22tcessna@salesforce.com%22%2C%22subscribed%22:true}; ajsgroupid=null; ajsanonymousid=%22969ed331-16b3-4085-a8ac-fb115ff1b239%22; ajsuserid=%2200580000008sJTeAAM%22; referrerog=https%3A%2F%2Fwww.wrike.com%2Fworkspace.htm; scc=true; ssq=%5B%5BB%5D%5D; WRUID=0; referrer=%2Fpromotions%2Forgs%2Ftrust-denull; _atssc=google%3B6; logouturl="/forums/ForumsProfile?communityId=09aF00000004HMGIA2&userId=005F0000005vgTSIAY"; JSESSIONID=1t99dbzj9k8f01ldx2bqgd3963; BrowserId=scMTRMpQRhKQrIO90S3X5g; dfcwikiproductiondfcwikiUserName=Tina+cessna; dfcwikiproductiondfcwikiEmail=tcessna%40salesforce.com; _coveo.analytics.history=[{"name":"Query","value":"scrummaster","time":"\"2016-11-19T23:25:48.495Z\""},{"name":"Query","time":"\"2016-11-19T23:25:12.971Z\""},{"name":"PageView","value":"https://help.salesforce.com/search#","time":"\"2016-11-19T23:25:11.865Z\"","title":""},{"name":"Query","time":"\"2016-11-19T23:22:02.272Z\""},{"name":"PageView","value":"https://help.salesforce.com/search#","time":"\"2016-11-19T23:22:01.045Z\"","title":""}]; coveovisitorId=2e1138cc-7f90-49dc-a57f-3a81333b4c42; _sessionid=b7a5fe36a0dc84b996c07b4c8c815ad0; AMCV8D6C67C25245AF020A490D4C%40AdobeOrg=283337926%7CMCAID%7C2B9F21A9050155D7-60001608E000E63D%7CMCIDTS%7C17134%7CMCMID%7C75890581083523027720282993698799024527%7CMCAAMLH-1480959939%7C9%7CMCAAMB-1480959939%7CNRX38WO0n5BH8Th-nqAGA; dfcwikiproductiondfcwikiLoggedOut=20161128185226; optimizelySegments=%7B%22313816972%22%3A%22gc%22%2C%22313850951%22%3A%22false%22%2C%22315175053%22%3A%22referral%22%7D; optimizelyBuckets=%7B%7D; webcoregeoCountry=us; webcoregeoRedirected=true; mbox=PC#1479352228571-325295.2843#1481571840|check#true#1480362300|session#3e77da2035f544d084435ec2f60c0f4a#1480364100; ga=GA1.2.1289443930.1463692751; WRUIDB=1284207514.1338952980; _CTData=gpv=32&apv38971www02=32&cpv38971www02=8&rpv38971www02=4; dfcsiteproductionsession=c3149883fe54e661e9e28bba53179d1c; 52609e00b7ee307e=583cbcac:583cbf04:00B6D208450010D44EC1184DD3:ch1ZvcWymPGTje8ZHXxaAAAAVitN9tzs3h8suB6IddFnEzMIBcav9yNrSEansEz65Cnehz3Yds=:012BF488450010D44EC1184DD3; apexdfclocale=en; svi=[CS]v1|2B9F21A9050155D7-60001608E000E63D[CE]; spers=%20sfid%3D27D8D9E252D2E878-060CF44EB36F549C%7C1543447389007%3B; ssess=%20c24%3DSFDC%2520Network%257C%255BDeveloperForce%255D%3B%20scc%3Dtrue%3B%20v0%3DSFDC%2520Network%257C%255BDeveloperForce%255D%3B%20sppv%3DDSC%25253Aus%25253Acontent%25253Atype%25253Awebinar%252C15%252C15%252C776%3B%20ssq%3Dsalesforceadnrollup2%253D%252526pid%25253DDSC%2525253Aus%2525253Acontent%2525253Atype%2525253Awebinar%252526pidt%25253D1%252526oid%25253Dhttps%2525253A%2525252F%2525252Fdeveloper.salesforce.com%2525252Fcalendar1%252526oidt%25253D1%252526ot%25253DA%252526oi%25253D1%3B; _atuvc=50%7C44%2C26%7C45%2C154%7C46%2C3%7C47%2C38%7C48; _atuvs=583ccf05d640d91f000; _utmtUA-45076517-1=1; _utmtUA-45076517-2=1; _utma=140220710.1289443930.1463692751.1480375171.1480380167.238; _utmb=140220710.2.10.1480380167; _utmc=140220710; _utmz=140220710.1479171484.210.17.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); ceg.s=ohdonb; _ceg.u=ohdonb; _ceir=1; _arv4=QFZHQXRI6JDSJJ5ZLW5E3T%3A20161128%3A2%7CWV5SBJVOOZADZJT5N5N6AC%3A20161118%3A2%7CUJXOHRFWA5ATZL3DNFWFCB%3A20161118%3A2%7CYR5S4QK655BCZGJ4ZNU6PU%3A20161115%3A12%7CD6DOAF3WC5FAVG5QLB545Y%3A20161115%3A11%7CKHANGVX5FNHJFGIKX7U7K5%3A20161115%3A180%7CZDMR3ICVVVCZPHFRE3X6IU%3A20161115%3A180%7CSQ4T36MSFBCK7AFKFSDTZE%3A20161115%3A114%7CZQLG66FZIRD3ZH4QMB4A75%3A20161116%3A37; _bizobzid=feef2a55-79d8-4363-949c-ba6132f7805d; bizocksm=3D785B1D049735FC; bizonpstats=14%3D41%2C; visitorid27572=219050766; lp=%7B%7D; webact=%7B%22lvdays%22%3A0%2C%22lvisit%22%3A1480375384385%2C%22session%22%3A1480380188877%2C%22lsearch%22%3A%22%22%2C%22ldtype%22%3A%22SFDC%20Network%22%2C%22lpage%22%3A%22SFDC%3Aus%3Alogin%22%2C%22counter%22%3A20%2C%22pv%22%3A1%2C%22fvisit%22%3A1479248920256%2C%22version%22%3A%22w172.1%22%2C%22customer%22%3A1479248920256%2C%22trial%22%3A1479248954922%2C%22d%22%3A%2270130000000sUW0%22%2C%22lcloud%22%3A%22No%20Cloud%22%2C%22seg%22%3A%22customer%3Aus%22%2C%22mcloud%22%3A%2213c2d4ea-09f3-420a-91a9-3b3e9460d59c%22%2C%22developer%22%3A1479428044302%2C%22db%22%3A%7B%22name%22%3A%22salesforce.com%20inc%22%2C%22size%22%3A%22ent%22%2C%22sic%22%3A%227372%22%2C%22ind%22%3A%22software%20%26%20technology%3Asoftware%20applications%22%2C%22cmp%22%3A%22%22%2C%22aud%22%3A%22enterprise%20business%3Asoftware%20%26%20technology%22%2C%22atype%22%3A%22%22%2C%22requestMade%22%3Atrue%7D%2C%22chat%22%3A0%7D; inst=APP0M; rememberUn=false; com.salesforce.LocaleInfo=us; oinfo=c3RhdHVzPURFTU8mdHlwZT0yJm9pZD0wMEQwMDAwMDAwMDAwNjI=; disco=0M:00D000000000062:0053000000BP481:1; autocomplete=0; 79eb100099b9a8bf=3:false:.salesforce.com; sfdclv2="KxG83H4jSto2fUbCJTnm0h7AxdZvTOecywhXKNi6q+gtAH3qrCEcI0xIUz/vB1Rm4="; sid=00DF000000055Kk!AQoAQO0gYehozKGoyGvc5FnGMb84RhBX6i7IvX8HrSpe32slawA4NCFT9oj4RJFfIVR7p1GCPywBpcqgZ0sLo9j4RPsC0uf; sid_Client=0000005vgTS000000055Kk; clientSrc=23.235.47.37; oid=00DF000000055Kk' 'https://developer.salesforce.com/auth/login'

    0
    Comment actions Permalink
  • devforce

    It seems that this VCL code is causing the issue:

    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(optimizely[a-zA-Z]+)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+)=[^;]*", ""); // google
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(webact)=[^;]*", ""); // salesforce
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(sfdc_lv2)=[^;]*", ""); // salesforce auth
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(BrowserId)=[^;]*", ""); // salesforce?
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(sccGuestUID)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(_eventqueue)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(useSiteUrlRewriter)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(_ceg\.[s|u])=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__CT_Data)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__ar_v(.*?))=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(_bizo_(.*?))=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(AMCV_(.*?))=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__utmt_UA(.*?))=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(appxud)=[^;]*", ""); // salesforce
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(oinfo)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(disco)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(s_pers)=[^;]*", "");
    set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(visitor_id(.*?))=[^;]*", "");
    

    Any ideas WHY? Does the assignment use some temporary space somewhere that gets overflowed?

    0
    Comment actions Permalink
  • devforce

    If I use a fastly "variable" instead of manipulating the cookie header directly it still fails, for example this code also fails:

    declare local var.cookies STRING;
    set var.cookies = req.http.Cookie;
    set var.cookies = regsuball(var.cookies, "(^|;\s*)(webact)=[^;]*", ""); // salesforce
    set var.cookies = regsuball(var.cookies, "(^|;\s*)(sfdc_lv2)=[^;]*", ""); // salesforce auth
    set req.http.Cookie = var.cookies;
    
    0
    Comment actions Permalink

Please sign in to leave a comment.