I've been trying to edit/view http://drupal.org/node/224333 and I keep getting the following error:

ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: http://drupal.org/node/224333

The following error was encountered:

    * Zero Sized Reply 

Squid did not receive any data for this request.

Your cache administrator is root@osuosl.org.
Generated Sat, 29 Nov 2008 17:39:16 GMT by www3.drupal.org (squid/2.6.STABLE17) 

Comments

dave reid’s picture

Not too long after I posted a message about this in #drupal-infrastructure, the manatee bot posted:
(notice) PROBLEM: www1.drupal.org/NRPE - Swap Usage is WARNING, SWAP WARNING - 29% free (543 MB out of 1913 MB) Sat Nov 29 17:41:42 UTC 2008

dave reid’s picture

Marked #340627: Zero Sized Reply as a duplicate of this bug.

dave reid’s picture

18 hours later, still getting this error and I can't edit the 6.x to 7.x page. :(

killes@www.drop.org’s picture

I am lookign into this. For some reason the page causes the mysql server to go away.

killes@www.drop.org’s picture

Actually, you can go to http://drupal.org/node/224333/edit directly. If you save the node, you'll get the "zero sized reply" thing again, but the edits are saved to the DB.

However, previews do not work.

I am guessing that somehow the url filter is getting messed up.

Indeed, if I convert the input format to "full html" the node loades fine. But now you can't edit it anymore. ;(

gerhard killesreiter’s picture

Project: Drupal.org infrastructure » Project issue tracking
Version: » 5.x-2.x-dev
Component: Webserver » Issues

I've identified this to be a problem with the project link filter. The preg_match of the filter apparently dies a horribly death and takes the runnning php process with it.

I've hacekd the code on d.o so that the page is still visible, but if you make a copy of the node, you can easily reproduce this.

I suggest to convert the filterting process into a two-stage process which would only feed shorter text pieces to the regexp.

john morahan’s picture

Wow, that is one nasty regular expression, and I guess it's triggering something like http://bugs.php.net/bug.php?id=27525

Would it be possible to avoid those recursive lookahead assertions entirely and instead do something like this?

  case 'process':
    $regex = '(?:(?<!\w)\[#\d+(?:-\d+)?\](?!\w))|<pre>.*?<\/pre>|<code>.*?<\/code>|<a>.*?<\/a>';
    $text = preg_replace_callback("/$regex/", 'project_issue_link_filter_callback', $text);
    return $text;
// ...
function project_issue_link_filter_callback($matches) {
  if (preg_match('/^\[#(\d+)(?:-(\d+))?\]$/', $matches[0], $parts)) {
    return create_the_link_somehow($parts);
  }
  else {
    return $matches[0];
  }
}
john morahan’s picture

Status: Active » Needs review
StatusFileSize
new3.07 KB
john morahan’s picture

Title: 'Zero Sized Reply' Squid error on viewing or editing docs page » Issue link filter causing PCRE segfault
aclight’s picture

This has come up before, and I assume this problem is essentially the same as mentioned in #89673: GHOP #53: add input filter to convert #12345 into an issue link. It's probably easier to not call this issue a duplicate, but I wanted to link to that issue because there is some relevant discussion there.

dww’s picture

Assigned: Unassigned » dww
Status: Needs review » Fixed
StatusFileSize
new3.36 KB

This bug was still around, since http://drupal.org/node/224333 was failing after I deployed my recent changes from #367423: Make "assigned to" on issue links opt-in (by appending '@'). I guess Gerhard's local hack to disable the filter on that specific node was blasted when I updated the code. Since there was no comment nor documentation about this local patch, it was lost.

Anyway, I re-rolled/re-wrote this patch to merge it with my changes from #367423 and tested it. All seems to work, so I committed the attached patch to HEAD and DRUPAL-5--2 (miraculously, the same patch applied to both branches). ;)

Thanks, John!
-Derek

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Logrise’s picture

Still the same error on Drupal 6.10 - Zero Sized Reply.
On pages
admin/build/translate/import
admin/build/themes/select
and many other. I cant understand- this is bug or host error and does it fixed or will not?
Ok, I will replace this post elsewhere.

dww’s picture

@Logrise: That has nothing to do with this module. Please look + post elsewhere.

gerhard killesreiter’s picture

Status: Closed (fixed) » Active
pwolanin’s picture

Status: Active » Closed (fixed)

This bug is still causing problems on d.o now - apparently this patch is not sufficient.

killes says this is caused by this bug: http://drupal.org/node/396246

pwolanin’s picture

Status: Closed (fixed) » Active

whoops - cross-post

gerhard killesreiter’s picture

Status: Active » Closed (fixed)

No, apparently, this is different:

when we had the old bug, you could edit, but not view the result. THis time you can't save anything.