![]() |
|
P is for Practical | |
PerlMonks |
May be OT: Can ad blockers truncate POST data?by dws (Chancellor) |
on Feb 10, 2004 at 19:16 UTC ( #327992=perlquestion: print w/replies, xml ) | Need Help?? |
dws has asked for the wisdom of the Perl Monks concerning the following question:
I'm debugging a strange form posting problem, and am wondering if anyone has run across anything like it before.
My webapp generate a form that contains a textarea, and several hidden fields. The final hidden field is a timetamp (as text, of course), for the file being edited. To prevent edit collisions, when the form is submitted, this timestamp is checked against the current file timestamp. If they don't match, the user gets an advisory page, and their edit isn't saved. This scheme, lightweight as it is, has been working fine for years. Now, one of my users complains that he's suddenly unable to edit. We spend an hour on the phone.
It happens that we're running nearly identical configurations (exact same version number of IE, same patchlevel on XP Pro).
But I can save edits and he can't.
I add debugging code to the app, and notice, eventually, that when he submits the edit form, the last two characters of timestamp field--the final field in the form--have been truncated. We confirm (by viewing source) that our browsers are are seeing identical HTML for the HTML form. So something between his browser and the web server is screwing with his form submission. As a workaround, I added a hidden field that contains some padding characters to the end of the form, on the assumption that it will get truncated instead of the timestamp field. My user can now save edits, and is now happy and less motivated to continue debugging. I've inspected the application code (a simple, vanilla CGI.pm CGI), and can see nothing that explains the problem. The relevant code is where cgi_param() is simply and $self->{'cgi'} is a vanilla CGI instance. On further interrogation, the user admits to having recently installed some pop-up blocking software (Google toolbar and "Add/Subtract Pro"), but claims that he isn't have problems with any other site. It sure looks like one or both of the pop-up blockers (perhaps by interaction) are interfering with POSTs, perhaps by rewriting content-length or content. A Google search turns up nothing interesting, other than vague claims that ad blockers can do evil things. Can anyone shed light on this? Pointers/wisdom will be appreciated. Dave
Back to
Seekers of Perl Wisdom
|
|