Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSGI: WARNI [waitress] application returned too few bytes (0) for specified Content-Length (994) via app_iter #513

Closed
d-maurer opened this issue Feb 19, 2019 · 5 comments

Comments

@d-maurer
Copy link
Contributor

commented Feb 19, 2019

Apparently, there is a (minor) Content-Length problem in the WSGI interaction.

Clicking in a Plone site on the management page "acl_users/plugins/manage_plugins" on any of the plugins, results in a series of "waitress" warnings of the form:

2019-02-19 10:26:55,962 WARNI [waitress:450][waitress] application returned too few bytes (0) for specified Content-Length (990) via app_iter
2019-02-19 10:26:55,962 WARNI [waitress:450][waitress] application returned too few bytes (0) for specified Content-Length (1003) via app_iter
2019-02-19 10:26:55,966 WARNI [waitress:450][waitress] application returned too few bytes (0) for specified Content-Length (1018) via app_iter

@icemac icemac added the bug label Feb 20, 2019

@icemac icemac added this to To do in Zope 4 final release via automation Feb 20, 2019

@icemac icemac added this to the 4.0 final milestone Feb 20, 2019

@icemac

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

@d-maurer Could the be a problem in the code behind acl_users/plugins/manage_plugins? I have never seen such warnings before, although using Zope 4.0b9 daily in union.cms.

@d-maurer

This comment has been minimized.

Copy link
Contributor Author

commented Feb 24, 2019

Meanwhile, I have seen this warning frequently. While is seems quite reproducible with "manage_plugins", in other cases, it happens non deterministically. I conclude from this that it is not an application problem but something in the communication with "waitress".

@dataflake

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Just FYI, I have seen the error myself and also within the context of a PluggableAuthService, but at least with current master checkouts I don't get them anymore.

I had changed many of the page templates in the product to be more compatible with the new Zope 4 ZMI, that may have made it disappear in this particular place.

Note to whoever looks at this: Install Products.PluggableAuthService version 2.0b2 or earlier.

@dataflake

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

I take that back: You were talking about the PluginRegistry, but that has seen template changes in the meantime as well. But I have tried with versions 1.6.1 and 1.6 and just can't reproduce it anymore. Not sure where to look right now. waitress itself had its last release in late January, so that hasn't changed. Maybe it is changes in the Zope code.

@dataflake dataflake self-assigned this Apr 15, 2019

@dataflake

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

OK, figured it out and will put in a fix later. The culprit is objects of type ImageFile, like those ugly arrows in some of those forms. ImageFile set Content-Length to the file size, but later on checks to see if it can just return a 304 with empty body instead of the file. At that moment the Content-Length header needs to be reset to 0.

@dataflake dataflake closed this in bce7603 Apr 15, 2019

Zope 4 final release automation moved this from To do to Done Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.