Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-03 19:47:44

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Random Numbers - Driving me crasy

A started to update my site this day and a very strange phenomena occurs:
Firefox starts the page with some kind of random numbers:

313b
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<head>

These numbers appear only in Firefox and i’m pretty sure that the are not caused by any of my plugins!
I don`t see these f*** numbers in Opera or in IE (First time every(!) that IE is not debt)

If found nothing in TXP forum, but it seems like that WP causes the very same numbers depending on wrong server protocol:

Wordpress Forum
Wordpress Trac
A possible solution in Wordpress Forum

Does anyone get these numbers or is the world bad only to me?
Had anyone anytime the same problem?

Oh, please: Have a look, after several hours of (un)installing Firefox, disable all plugins and watching
hundreds lines of code, i’m short before despairing!

samisdat.org

Edit: I have to get my bus by now and i will have some bad nightmares about numbers and letters, but after booting my PC tommorow it would be better then coffee and cigarettes to read your answers and solutions :)

Last edited by Bastian (2007-05-23 13:02:35)

Offline

#2 2007-05-03 20:15:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Random Numbers - Driving me crasy

Bastian, I don’t see these numbers. But someone posted about this before, here. Not sure if it’s going to help you…

Last edited by els (2007-05-03 20:15:29)

Offline

#3 2007-05-03 20:39:33

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Random Numbers - Driving me crasy

I don’t see them in Firefox 2.0.3 Mac either. BTW, very cool language switcher.

Offline

#4 2007-05-03 21:22:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Random Numbers - Driving me crasy

Acknowledged and considered a bug.

Offline

#5 2007-05-03 21:31:38

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Random Numbers - Driving me crasy

Bastian, can you try patching the index.php file as follows (line numbers may be a bit different, since I’m doing this on the SVN version) and check if that solves the problem:

--- index.php   (revision 2309)
+++ index.php   (working copy)
@@ -24,7 +24,7 @@
                if (substr(php_sapi_name(), 0, 3) == 'cgi' and empty($_SERVER['FCGI_ROLE']) and empty($_ENV['FCGI_ROLE']))
                        header("Status: $status");
                else
-                       header("HTTP/1.1 $status");
+                       header($_SERVER['SERVER_PROTOCOL'] . ' '. $status);

                $msg = 'config.php is missing or corrupt.  To install Textpattern, visit <a href="./textpattern/setup/">textpattern/setup/</a>';
                exit ($msg);

Those little hex numbers you see on your website are related to “chunked encoding”. It looks like either your browser or some proxy in between is doing a HTTP/1.0 request and textpattern always responds with HTTP/1.1. Since chuncked encoding probably isn’t supported in HTTP/1.0, the client doesn’t recognize the chunks and the sizes of those chunks (the hex number indicates the size of the chunk that follows, which is why the last number is zero, because after the last chunk nothing follows).

Last edited by ruud (2007-05-03 21:34:43)

Offline

#6 2007-05-03 21:32:28

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Random Numbers - Driving me crasy

Try making the changes done here.

Offline

#7 2007-05-04 09:54:26

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: Random Numbers - Driving me crasy

Thank you so much Els, jm, ruud and Mary! You made my day :)

I tried both solutions, ruud’s and the mary’s from trac.
Both make these wired numbers gone!

I had a look to my look at my log files and it seems like that Firefox wants HTTP/1.0 while coming via our proxy.

Is our proxy misconfigured or is it a Firefox issue?

What ever…
Did i ever mention, that i really love TXP community?
Without you guys, i could easy spend some more hours without even getting close to this solution.

Offline

#8 2007-05-04 10:17:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Random Numbers - Driving me crasy

It’s not unusual for a proxy to use HTTP/1.0, although I’d expect a modern proxy to be able to use HTTP/1.1 as well. Using HTTP/1.0 is perfectly valid, so it’s no misconfiguration on your end.

Offline

#9 2007-05-04 10:26:46

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: Random Numbers - Driving me crasy

no misconfiguration on your end

Perhaps not in this cause, but my livetime is cutted by years, since i know the admin of our office network.
Sometimes i think that he is thinking the only way to gain security is to unplug every single PC :(

BTW: ruud do you know why these chunk is appered only in Firefox. Opera, Lynx and even IE where fine.

Offline

#10 2007-05-04 18:16:04

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Random Numbers - Driving me crasy

Without seeing what headers were exchanged between Firefox and your proxy it’s hard to tell if Firefox is doing the right thing. If you’re interested, try the “live HTTP headers” extension and check which HTTP version is used in the request that Firefox sends to the proxy, which HTTP version the proxy specifies in the response and if the transfer-encoding header is present and set to ‘chunked’ in that response.

Necko, the Mozilla/Firefox networking library, sometimes follows the HTTP specs more accurately than other browsers and in those cases it’s less tolerant to mistakes in HTTP responses. At $dayjob, I found that using chunked encoding combined with a HTTP 304 response header (which should not have a response body) caused some very unpleasant side effects for Firefox users, while other browsers didn’t mind at all.

Offline

Board footer

Powered by FluxBB