You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Leach <sl...@askalix.com> on 2002/05/10 10:26:59 UTC

Apache - Possible to Modify Header or Negate Some Apache Header Response?

I posted this under an ISAPI subject - which is not really correct - so am
reposting under what I hope might be more pertinent to the question!

Having looked at a problem with the use of  DLL's on a WIN32 version of
Apache, which is now solved using ISAPI, I have observed the following from
the header (examples are Apache and IIS):
========================================
APACHE

HTTP/1.1 200 OK
Date: Thu, 09 May 2002 15:52:12 GMT
Server: Apache/2.0.36 (Win32)
Connection: close
Content-Type: application/octet-stream

Content-type: text/vnd.wap.wml

<?xml version="1.0"?>
========================================

========================================
IIS

HTTP/1.0 200 OK
Server: Microsoft-IIS/4.0
Date: Thu, 09 May 2002 23:51:41 GMT
Set-cookie: ASKALEXTT=1020988301;

Content-type: text/vnd.wap.wml

<?xml version="1.0"?>
========================================

In the IIS response, the server does not return an end of encoding content
type, allowing us to send our own, demonstrated here by us calling for a WAP
formatted .wml file which the .dll does, it also returns a cookie - which we
want to retain. In this example, branding up the server allows us to return
browser formatted data, Wap formatted data, or data for specific devices, so
header information is critical for us.

In the Apache header, the return of the Content-Type:
application/octet-stream actually causes a problem in that we are unable to
modify the header from the .dll and this disrupts the intended action.

My question is thus: Is there any way that we can tell Apache not to send
back the Content type and allow the .dll to add or modify the header before
it is returned? Or, are we breaking some fundamental law with HTTP Servers
by attempting this action?

Once again thanks in advance for any pointers or information.


Best Regards,

Steve Leach
Network Manager




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache - Possible to Modify Header or Negate Some Apache Header Response?

Posted by Steve Leach <sl...@askalix.com>.
Group,

The line was a cut & paste problem - to clarify further the following is the
sequence of events:

a.. We issue a HTTP request to the server which calls an existing (example)
request.dll file.
a.. The request.dll executes and returns the requested file type which could
be a .html or .wml (or .xml, .gif, .jpg etc) file
a.. Apache delivers a complete response header including mime type
a.. This precludes the .DLL from returning it's own mime type or any other
header value it may wish to include (cookie: etc).

Now this could equally apply to a CGI program (instead of request.dll) -
Apache should surely not be attempting to define a mime type that it has no
way of knowing the content of  as it is delivered by the .dll (or CGI).

I hope I am explaining this sufficiently? I am perhaps not a programmer by
nature - and couch this in terms of visible response to a query

At the moment the fact that the .dll returns the mime type, and then another
mime type is returned by Apache, breaks our system. We can accomodate the
mime type by switching ours off - but Apache delivers the wrong type as it
cannot know what the .dll is returning to the user......


Best Regards,

Steve Leach
Network Manager
MI International Limited
Eaglescliffe Logistics Centre
Durham Lane
Egglescliffe
URL: http://www.askalix.com
TEL: 01642 356205
e-mail: sleach@askalix.com


----- Original Message -----
From: "Daniel Lopez" <da...@rawbyte.com>
To: <us...@httpd.apache.org>
Sent: Friday, May 10, 2002 6:14 PM
Subject: Re: Apache - Possible to Modify Header or Negate Some Apache Header
Response?


>
> There is a space before the Content-type: text/vnd.wap.wml line
> Is that intentional or just from the copy and paste?
> It seems to me that that file contains the Content-type header. That is
> incorrect, the server should add those headers:
> http://www.webreview.com/2001/02_16/developers/index02.shtml
>
> Otherwise the client will mistake that header as part of the page content
>
> > I posted this under an ISAPI subject - which is not really correct - so
am
> > reposting under what I hope might be more pertinent to the question!
> >
> > Having looked at a problem with the use of  DLL's on a WIN32 version of
> > Apache, which is now solved using ISAPI, I have observed the following
from
> > the header (examples are Apache and IIS):
> > ========================================
> > APACHE
> >
> > HTTP/1.1 200 OK
> > Date: Thu, 09 May 2002 15:52:12 GMT
> > Server: Apache/2.0.36 (Win32)
> > Connection: close
> > Content-Type: application/octet-stream
> >
> > Content-type: text/vnd.wap.wml
> >
> > <?xml version="1.0"?>
> > ========================================
> >
> > ========================================
> > IIS
> >
> > HTTP/1.0 200 OK
> > Server: Microsoft-IIS/4.0
> > Date: Thu, 09 May 2002 23:51:41 GMT
> > Set-cookie: ASKALEXTT=1020988301;
> >
> > Content-type: text/vnd.wap.wml
> >
> > <?xml version="1.0"?>
> > ========================================
> >
> > In the IIS response, the server does not return an end of encoding
content
> > type, allowing us to send our own, demonstrated here by us calling for a
WAP
> > formatted .wml file which the .dll does, it also returns a cookie -
which we
> > want to retain. In this example, branding up the server allows us to
return
> > browser formatted data, Wap formatted data, or data for specific
devices, so
> > header information is critical for us.
> >
> > In the Apache header, the return of the Content-Type:
> > application/octet-stream actually causes a problem in that we are unable
to
> > modify the header from the .dll and this disrupts the intended action.
> >
> > My question is thus: Is there any way that we can tell Apache not to
send
> > back the Content type and allow the .dll to add or modify the header
before
> > it is returned? Or, are we breaking some fundamental law with HTTP
Servers
> > by attempting this action?
> >
> > Once again thanks in advance for any pointers or information.
> >
> >
> > Best Regards,
> >
> > Steve Leach
> > Network Manager
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache - Possible to Modify Header or Negate Some Apache Header Response?

Posted by Steve Leach <sl...@askalix.com>.
Daniel,

Thank you for the response!

In all honesty I do not know if that line was delivered or just a cut &
paste feature, and the utility is at work - and I am now finished and at
home until Monday - I cannot find out until then. But I have looked at the
link you suggested and feel there are some options I can look at - for which
thanks again.

I can at the very least try the AddType to see what is treturned and switch
of our delivery of a meme type  allowing Apache to fulfil the request. If
that works, we are in business!


Best Regards,

Steve Leach
Network Manager
Mi-Int Limited
Eaglescliffe Logistics Centre
Durham Lane
Egglescliffe
URL: http://www.askalix.com
TEL: 01642 356205
e-mail: sleach@askalix.com

----- Original Message -----
From: "Daniel Lopez" <da...@rawbyte.com>
To: <us...@httpd.apache.org>
Sent: Friday, May 10, 2002 6:14 PM
Subject: Re: Apache - Possible to Modify Header or Negate Some Apache Header
Response?


>
> There is a space before the Content-type: text/vnd.wap.wml line
> Is that intentional or just from the copy and paste?
> It seems to me that that file contains the Content-type header. That is
> incorrect, the server should add those headers:
> http://www.webreview.com/2001/02_16/developers/index02.shtml
>
> Otherwise the client will mistake that header as part of the page content
>
> > I posted this under an ISAPI subject - which is not really correct - so
am
> > reposting under what I hope might be more pertinent to the question!
> >
> > Having looked at a problem with the use of  DLL's on a WIN32 version of
> > Apache, which is now solved using ISAPI, I have observed the following
from
> > the header (examples are Apache and IIS):
> > ========================================
> > APACHE
> >
> > HTTP/1.1 200 OK
> > Date: Thu, 09 May 2002 15:52:12 GMT
> > Server: Apache/2.0.36 (Win32)
> > Connection: close
> > Content-Type: application/octet-stream
> >
> > Content-type: text/vnd.wap.wml
> >
> > <?xml version="1.0"?>
> > ========================================
> >
> > ========================================
> > IIS
> >
> > HTTP/1.0 200 OK
> > Server: Microsoft-IIS/4.0
> > Date: Thu, 09 May 2002 23:51:41 GMT
> > Set-cookie: ASKALEXTT=1020988301;
> >
> > Content-type: text/vnd.wap.wml
> >
> > <?xml version="1.0"?>
> > ========================================
> >
> > In the IIS response, the server does not return an end of encoding
content
> > type, allowing us to send our own, demonstrated here by us calling for a
WAP
> > formatted .wml file which the .dll does, it also returns a cookie -
which we
> > want to retain. In this example, branding up the server allows us to
return
> > browser formatted data, Wap formatted data, or data for specific
devices, so
> > header information is critical for us.
> >
> > In the Apache header, the return of the Content-Type:
> > application/octet-stream actually causes a problem in that we are unable
to
> > modify the header from the .dll and this disrupts the intended action.
> >
> > My question is thus: Is there any way that we can tell Apache not to
send
> > back the Content type and allow the .dll to add or modify the header
before
> > it is returned? Or, are we breaking some fundamental law with HTTP
Servers
> > by attempting this action?
> >
> > Once again thanks in advance for any pointers or information.
> >
> >
> > Best Regards,
> >
> > Steve Leach
> > Network Manager
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache - Possible to Modify Header or Negate Some Apache Header Response?

Posted by Daniel Lopez <da...@rawbyte.com>.
There is a space before the Content-type: text/vnd.wap.wml line
Is that intentional or just from the copy and paste?
It seems to me that that file contains the Content-type header. That is
incorrect, the server should add those headers:
http://www.webreview.com/2001/02_16/developers/index02.shtml

Otherwise the client will mistake that header as part of the page content

> I posted this under an ISAPI subject - which is not really correct - so am
> reposting under what I hope might be more pertinent to the question!
> 
> Having looked at a problem with the use of  DLL's on a WIN32 version of
> Apache, which is now solved using ISAPI, I have observed the following from
> the header (examples are Apache and IIS):
> ========================================
> APACHE
> 
> HTTP/1.1 200 OK
> Date: Thu, 09 May 2002 15:52:12 GMT
> Server: Apache/2.0.36 (Win32)
> Connection: close
> Content-Type: application/octet-stream
> 
> Content-type: text/vnd.wap.wml
> 
> <?xml version="1.0"?>
> ========================================
> 
> ========================================
> IIS
> 
> HTTP/1.0 200 OK
> Server: Microsoft-IIS/4.0
> Date: Thu, 09 May 2002 23:51:41 GMT
> Set-cookie: ASKALEXTT=1020988301;
> 
> Content-type: text/vnd.wap.wml
> 
> <?xml version="1.0"?>
> ========================================
> 
> In the IIS response, the server does not return an end of encoding content
> type, allowing us to send our own, demonstrated here by us calling for a WAP
> formatted .wml file which the .dll does, it also returns a cookie - which we
> want to retain. In this example, branding up the server allows us to return
> browser formatted data, Wap formatted data, or data for specific devices, so
> header information is critical for us.
> 
> In the Apache header, the return of the Content-Type:
> application/octet-stream actually causes a problem in that we are unable to
> modify the header from the .dll and this disrupts the intended action.
> 
> My question is thus: Is there any way that we can tell Apache not to send
> back the Content type and allow the .dll to add or modify the header before
> it is returned? Or, are we breaking some fundamental law with HTTP Servers
> by attempting this action?
> 
> Once again thanks in advance for any pointers or information.
> 
> 
> Best Regards,
> 
> Steve Leach
> Network Manager
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org