HTTP Response Was Text/html should be text/plain

0 views
Skip to first unread message

Shawn

unread,
Oct 20, 2009, 11:37:37 AM10/20/09
to Zeep Mobile
I keep getting this message when sending. However if I look at the
properties for my response page it says " Type: text/plain", "Encoding
ISO-8859-1".

You guys have any idea? I can send you the url if you want?

Deco Rior (Tennissource)

unread,
Oct 20, 2009, 11:39:10 AM10/20/09
to zeep-...@googlegroups.com
I think the encoding should be utf-8

Shawn

unread,
Oct 20, 2009, 11:43:01 AM10/20/09
to Zeep Mobile
Changed to "Content-Type: text/plain; charset=UTF-8" ... no go....

On Oct 20, 11:39 am, "Deco Rior (Tennissource)"

Shawn

unread,
Oct 20, 2009, 11:57:26 AM10/20/09
to Zeep Mobile
Here is the header of the page:

GET /fmt/index.php/processsmsdata/debug HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:
1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/
*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie:
__utma=128995145.1661569362.1254484630.1254840448.1256054103.13;
__utmz=128995145.1254484630.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=
(none); PHPSESSID=0829123b069e540058ab97b4731f1e23; ci_session=a%3A4%3A
%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A
%226b6b23de6673a41b8491882d9907a66d%22%3Bs%3A10%3A%22ip_address%22%3Bs
%3A12%3A%2297.65.65.226%22%3Bs%3A10%3A%22user_agent%22%3Bs%3A50%3A
%22Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+6.1%3B+en-US%3B+rv
%22%3Bs%3A13%3A%22last_activity%22%3Bs%3A10%3A%221256054091%22%3B
%7D248ed470c0e5ca2ad14c98a0d044ec38; __utmb=128995145.1.10.1256054103;
__utmc=128995145
Cache-Control: max-age=0

HTTP/1.x 200 OK
Date: Tue, 20 Oct 2009 15:56:01 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/
5.2.9
X-Powered-By: PHP/5.2.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
check=0
Pragma: no-cache
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset=UTF-8
----------------------------------------------------------

Deco Rior (Tennissource)

unread,
Oct 20, 2009, 12:18:04 PM10/20/09
to zeep-...@googlegroups.com
what does your php source look like?

Shawn

unread,
Oct 20, 2009, 12:41:01 PM10/20/09
to Zeep Mobile
Not sure if your familar with the codeigniter platform. but here it
is.

$this->output->set_header("Content-Type: text/plain; charset=UTF-8");
$this->output->set_header("HTTP/1.1 200 OK");

If you have specific php code post it up. I can test it out. I tried
using the php header() function with the same results.




On Oct 20, 12:18 pm, "Deco Rior (Tennissource)"

Deco Rior (Tennissource)

unread,
Oct 20, 2009, 12:54:08 PM10/20/09
to zeep-...@googlegroups.com
Not sure if this matters, but try switching the order of those

Shawn

unread,
Oct 20, 2009, 1:07:31 PM10/20/09
to Zeep Mobile
I will try that. Also I was thinking ... if you look at my header you
see its "HTTP/1.x 200 OK" ... in your documentation example you only
see "200 OK" ... you sample:

200 OK
Date: Tue, 20 Oct 2009 15:02:48 GMT
Content-Type: text/plain
Content-Length: 7
Hi Joe!

Could it be because mine has the "HTTP/1.x" before the 200?



On Oct 20, 12:54 pm, "Deco Rior (Tennissource)"

Shawn

unread,
Oct 20, 2009, 1:17:51 PM10/20/09
to Zeep Mobile
tried switching order... no difference...

On Oct 20, 12:54 pm, "Deco Rior (Tennissource)"

bdg

unread,
Oct 20, 2009, 5:27:09 PM10/20/09
to Zeep Mobile
Whats the purpose of the two headers?
The response has to be plain text so just set the 1 header
header("Content-Type: text/plain");
> > >>> *;q=0.8- Hide quoted text -
>
> - Show quoted text -

Deco Rior (Tennissource)

unread,
Oct 20, 2009, 5:52:12 PM10/20/09
to zeep-...@googlegroups.com
Actually now you mention it that is all we do too!

Worth a try.

Shawn Fultz

unread,
Oct 21, 2009, 2:42:11 PM10/21/09
to zeep-...@googlegroups.com
The first part was just the get where I refreshed the page. this is the response header:

HTTP/1.x 200 OK
Date: Tue, 20 Oct 2009 15:56:01 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/
5.2.9
X-Powered-By: PHP/5.2.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
check=0
Pragma: no-cache
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset=UTF-8


I am completely out of ideas... is there anyone that can provide a sample of what they use to provide the response???

Deco Rior (Tennissource)

unread,
Oct 21, 2009, 2:59:51 PM10/21/09
to zeep-...@googlegroups.com
This is what we get back

  1. http://tennis4.tennissource.net/incoming.lasso
  2. Request Headers
    1. Accept:
      application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    2. User-Agent:
      Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
  3. Response Headers
    1. Connection:
      close
    2. Content-Encoding:
      gzip
    3. Content-Length:
      77
    4. Content-Type:
      text/plain
    5. Date:
      Wed, 21 Oct 2009 18:57:55 GMT
    6. Mime-Version:
      1.0
    7. Server:
      Apache/2.0.52 (CentOS)
    8. Vary:
      Accept-Encoding,User-Agent

Shawn Fultz

unread,
Oct 21, 2009, 3:05:53 PM10/21/09
to zeep-...@googlegroups.com
Are you generating the response via php? 

I see your encoding in gzip ... does that matter?

Shawn Fultz

unread,
Oct 21, 2009, 3:28:51 PM10/21/09
to zeep-...@googlegroups.com
Well guys... i made a break through of sort. I created a test.php file in the root directory with the following code:

<?php  $data = "Successfully signed up";
 header("Cache-Control: no-cache, must-revalidate");
 header("Status: 200 OK"."\r\n");
 header("Date: ".gmdate(DATE_RFC822)."\r\n");
 header("Content-Type: text/plain charset=UTF-8\r\n");
 header("Content-Length: " . strval(strlen($data))."\r\n");
 echo "Successfully signed up";
?>

Changed the callback url and it works fine... this tells me its something within the Codeigniter platform that is outputting the header before I manually set the header or header or vice versa. So once I figure out what is causing that I will let you know so if anyone else is trying to integrate your service within the Codeigniter platform you will know what causes this.

I'm developing a Fuel Mileage tracking application and integrating the zeep service so you can add fillups via text message :) Its pretty much done except for this issue. If you interested in beta testing or checking out the application shoot me an email @  ... sfu...@slfsolutions.com and I will send you a url

Thank all of you for your support!! This is a very cool service!!!!
Shawn 

Deco Rior (Tennissource)

unread,
Oct 21, 2009, 4:05:53 PM10/21/09
to zeep-...@googlegroups.com
We are using Lasso...much nicer than php in our opinion

Good luck sounds like an awesome service

Deco

Shawn

unread,
Oct 30, 2009, 2:36:07 PM10/30/09
to Zeep Mobile
I actually figured this out the other day. By putting:

<?php header("Content-Type: text/plain charset=UTF-8\r\n");

in the very first line of the controller actually ended up fixing the
problem.

Thanks !
Shawn

On Oct 21, 4:05 pm, "Deco Rior (Tennissource)"
> > On Wed, Oct 21, 2009 at 2:59 PM, Deco Rior (Tennissource) <decor...@tennissource.net
> >> On Tue, Oct 20, 2009 at 5:52 PM, Deco Rior (Tennissource) <decor...@tennissource.net
Reply all
Reply to author
Forward
0 new messages