Tuesday 10 September 2013

Content-Length mismatch reported from Google App Engine

This is just a quick note to myself really.

I am building a java project on Google App Engine, using a local HOSTS override to point to my development server. After a recent round of refactoring, one of my pages stopped working in Chrome without any error messages.

I fired up Fiddler2 to investigate, and it reported:
Content-Length mismatch: Response Header indicated 4,021 bytes, but server sent 4,018 bytes.

This was rather strange and unexpected, as none of the changes messed with the headers.

Anyway, after spending rather too long reading through all of my filter code, I finally realized that I had removed the Sitemesh decorators from the page, but it was still being processed.

One quick change later and Sitemesh was validated as the culprit.

If you find yourself in a similar situation, I hope this is useful.

No comments:

Post a Comment