php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12991 Wrong content type while parsing .wml files which are parsed by php
Submitted: 2001-08-28 03:01 UTC Modified: 2001-11-03 22:06 UTC
From: boris at gamate dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.6 OS: Linux with Apache 1.3.20
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: boris at gamate dot com
New email:
PHP Version: OS:

 

 [2001-08-28 03:01 UTC] boris at gamate dot com
Hi there,

Scenario:

I added to the Apache Mime Types:

text/vnd.wap.wml                wml

Next I set PHP to parse .wml files in apache config:

AddType application/x-httpd-php .wml

What I want to do ? Parsing .wml files for wap pages.

What's the result ?

telnet domain.com 80
GET /wap.wml HTTP/1.0
Accept: text/vnd.wap.wml
<return><return>

Apache/PHP returns:

HTTP/1.1 200 OK
Date: Tue, 28 Aug 2001 07:04:44 GMT
Server: Apache/1.3.20 (Unix) PHP/4.0.6
X-Powered-By: PHP/4.0.6
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
Connection: close
Content-Type: text/html

I sent Accept: text/vnd.wap.wml and get Content-Type: text/html. That hat to return a 406 Error - not accaptable.

Content Type seit in Apache Mime Config is ignored plus Accept: Header is ignored. 

If I set a Content-Type with the Header funktion everthing ist fine - but if not there have to be an Accept Error !

Best regards
Boris

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-03 22:06 UTC] sniper@php.net
You can use this php.ini directive to set the 
mimetype:

default_mimetype = text/vnd.wap.wml

This can also be set within httpd.conf / .htaccess files:

php_value default_mimetype text/vnd.wap.wml

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 15:01:31 2025 UTC