0

I have a website that's been running for 7 years. Recently we started seeing a problem where numbers were being added to the web page of a small number of users - the numbers would be hexadecimal numbers around 8000 - usually something like 1fxx where xx is another hex number. After some research, I found out that these appear on certain networks that use certain proxies and are related to Chunked Transfer encoding. For instance, we see it all the time with iOS 8 on AT&T, but didn't see it when we were running iOS 7 on AT&T. Some of the pages have code written many years ago and never had the problem until recently. Other pages are new. If the network is having a problem, it appears on all pages (new and old)

We found if we put a php header("HTTP/1.0 200 OK") at the top of the file, the problem is resolved for those networks with proxies that had the problem. However, on another set of people, often running Samsung Galaxy S5 machines, they now get an error that the site is not available. So if I force it to HTTP1.0, I make it stop working for some people. If I don't, other people have an issue. For most people, it works either way.

The web stack is CentOS release 6.5, Apache/2.0.64, MySQL 5.1.73, PHP 5.2.9.

Is there something I can put in to detect whether I should put in the HTTP1.0 header or not? And what should I look for to try and make it start working with those proxies that cause the chunked transfer encoding to not be correctly interpreted. Is there some way to increase the size of the chunked data so the entire page goes in one chunk?

Jim
  • 3
  • 4
  • I find this very difficult to believe. Any client or proxy that can't handle chunked encoding is going to break on thousands of web sites. – Barmar Oct 25 '14 at 03:09
  • I agree but have no idea why this started happening. What possible setting could I have that is making this happen. That fact that it happens on older code implies that it is not in my HTML code. – Jim Oct 25 '14 at 03:15
  • You're running a pretty old version of PHP, as well as an EOL version of Apache. – Barmar Oct 25 '14 at 03:23
  • Forgive my ignorance and I appreciate your help - isn't the encoding related to Apache and not PHP. Would it be possible to upgrade Apache and leave the PHP version as is (some of this code was written 7 years ago and may use PHP code that has been deprecated). Or will I need to upgrade both together. – Jim Oct 25 '14 at 03:28
  • I don't know enough about how Apache and PHP work together to be sure which one is responsible for this. Chunked encoding has been around so long, I'd be surprised if any version of either application has a bug in this regard. – Barmar Oct 25 '14 at 03:32
  • We've been running with this stack for a while - the issues only started showing up in the last 2 months. As far as I know, we didn't have any changes made to our stack then. Extremely frustrating. Thanks for the ideas - I'll see if the people who host our site can help on the Apache/PHP version questions, but I agree with you on the handling of chunked encoding. – Jim Oct 25 '14 at 03:38
  • Probably would be difficult to really figure out what's going on without knowing the actual URL in play. – TML Oct 25 '14 at 05:11

0 Answers0