Re: missing charset or bung server settings?
From: Andy Hassall (andy_at_andyh.co.uk)
Date: 11/21/04
- Next message: jean: "Re: how do i INSERT a value that contains a variable into a mySQL database?"
- Previous message: Theo: "Re: Any math guru's out there?"
- In reply to: bobs: "missing charset or bung server settings?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 21 Nov 2004 18:15:17 +0000
On 21 Nov 2004 06:10:39 -0800, bobason456@hotmail.com (bobs) wrote:
>Hello, I was wondering if some one could take a look at the two
>example server outputs below, and help me understand what is wrong.
>I'm getting garbled characters.
>
>The php script I'm developing delivers XML to a client side
>application I'm also putting together in VB.NET .. Example 1 is my
>development PC.. It has a recent build of PDP & Apache. This output is
>good.
>
>Example 2 is the production server and is adding all sorts of strange
>characters, that are causing the XML to be invalid.
>
>I'm thinking it has somthing to do with the lack of charset in Ex2..
>perhaps. If that is the case can I specify it in the .htaccess file
>because I dont have direct control over the production server. Has any
>one seen this before?
Both outputs look similar to me. They're chunked transfer-encoded. If you're
using the output directly, your client is broken, as it's not decoding the
chunks, which IIRC is a required capability of any HTTP/1.1 client.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
>******** EXAMPLE 1 *************
>
>HTTP/1.1 200 OK
>Date: Mon, 22 Nov 2004 10:34:20 GMT
>Server: Apache/2.0.52 (Win32)
>X-Powered-By: PHP/5.0.2
>Connection: close
>Transfer-Encoding: chunked
>Content-Type: text/html; charset=ISO-8859-1
>
>fcc
Chunk size here. Indicates it's 4,044 bytes long. Presumably this covers the
entire document in one chunk.
>o;?<app><name>eek</name><author>Me</author><version>0.1</version><contact>me@.com</contact></app><link
>...
>
>
>******** EXAMPLE 2 *************
>
>HTTP/1.1 200 OK
>Date: Sun, 21 Nov 2004 13:48:28 GMT
>Server: Apache
>X-Powered-By: PHP/4.3.4
>Connection: close
>Transfer-Encoding: chunked
>Content-Type: text/html
>
>8d
Chunk #1, 0x8d = 141 bytes.
>o;?<app><name>eek</name><author>Me</author><version>0.1</version><contact>Me@.com</contact></app>
Data for chunk #1.
>2e
Chunk #2, 0x2e = 30 bytes.
><link src="example" rank="1" type="se">
Data for chunk #2.
>1f
><url>http://www.petz.com/>
>1b
><title>Petz Central</title>
>c5
And so on...
If your client can't handle this, perhaps it should be making HTTP/1.0
requests.
-- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
- Next message: jean: "Re: how do i INSERT a value that contains a variable into a mySQL database?"
- Previous message: Theo: "Re: Any math guru's out there?"
- In reply to: bobs: "missing charset or bung server settings?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|