Re: [WebDNA] Should I be able to use [setmimeheader name=Content-Type

This WebDNA talk-list message is from

2018


It keeps the original formatting.
numero = 114388
interpreted = N
texte = 2005 --Apple-Mail=_7D6C379F-2257-45E8-A68C-9D574478DEC7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Speaking of http headers, my Varnish cache sends all kinds of useful = information via X-headers but I am unable to gain access to them. = [listmimeheaders] seems to be filtered in some way. None of the = X-headers are returned. Mike > On Sep 11, 2018, at 9:10 AM, Tom Duke > wrote: >=20 > Hi all, >=20 > WebDNA 8.6.1 Server > Apache 2 > CentOS7 >=20 > Should I be able to change the 'Content-Type' header on a template = using something like: >=20 > [setmimeheader name=3DContent-Type&value=3Dapplication/json; = charset=3Dutf-8] >=20 > I can't get it to work. I have to use a htaccess file to set the = header on the template >=20 > > AddType application/json tpl > >=20 > It means I can't serve out different content types from the one = template. This appears to be possible in PHP. Do I need to change an = Apache setting or something to allow this? >=20 > Thanks > - Tom >=20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list = talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us --Apple-Mail=_7D6C379F-2257-45E8-A68C-9D574478DEC7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Speaking of http = headers, my Varnish cache sends all kinds of useful information via = X-headers but I am unable to gain access to them. =  [listmimeheaders] seems to be filtered in some way.  None of = the X-headers are returned.


Mike


On Sep 11, 2018, at 9:10 AM, = Tom Duke <tom@revolutionaries.ie> wrote:

Hi all,

WebDNA 8.6.1 Server
Apache = 2
CentOS7

Should I be able to change the 'Content-Type' = header on a template using something like:

[setmimeheader = name=3DContent-Type&value=3Dapplication/json; = charset=3Dutf-8]

I can't get it to work.  I have to use a = htaccess file to set the header on the template

<FilesMatch = "my-template.tpl">
   AddType application/json = tpl
</FilesMatch>
=

It means I can't serve out different content = types from the one template. This appears to be possible in PHP.  = Do I need to change an Apache setting or something to = allow this?

Thanks
- Tom

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_7D6C379F-2257-45E8-A68C-9D574478DEC7-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Should I be able to use [setmimeheader name=Content-Type (christophe.billiottet@webdna.us 2018)
  2. Re: [WebDNA] Should I be able to use [setmimeheader name=Content-Type ? (Stuart Tremain 2018)
  3. Re: [WebDNA] Should I be able to use [setmimeheader name=Content-Type (Michael Davis 2018)
  4. Re: [WebDNA] Should I be able to use [setmimeheader name=Content-Type ? (Donovan Brooke 2018)
  5. [WebDNA] Should I be able to use [setmimeheader name=Content-Type ? (Tom Duke 2018)
2005 --Apple-Mail=_7D6C379F-2257-45E8-A68C-9D574478DEC7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Speaking of http headers, my Varnish cache sends all kinds of useful = information via X-headers but I am unable to gain access to them. = [listmimeheaders] seems to be filtered in some way. None of the = X-headers are returned. Mike > On Sep 11, 2018, at 9:10 AM, Tom Duke > wrote: >=20 > Hi all, >=20 > WebDNA 8.6.1 Server > Apache 2 > CentOS7 >=20 > Should I be able to change the 'Content-Type' header on a template = using something like: >=20 > [setmimeheader name=3DContent-Type&value=3Dapplication/json; = charset=3Dutf-8] >=20 > I can't get it to work. I have to use a htaccess file to set the = header on the template >=20 > > AddType application/json tpl > >=20 > It means I can't serve out different content types from the one = template. This appears to be possible in PHP. Do I need to change an = Apache setting or something to allow this? >=20 > Thanks > - Tom >=20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list = talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us --Apple-Mail=_7D6C379F-2257-45E8-A68C-9D574478DEC7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Speaking of http = headers, my Varnish cache sends all kinds of useful information via = X-headers but I am unable to gain access to them. =  [listmimeheaders] seems to be filtered in some way.  None of = the X-headers are returned.


Mike


On Sep 11, 2018, at 9:10 AM, = Tom Duke <tom@revolutionaries.ie> wrote:

Hi all,

WebDNA 8.6.1 Server
Apache = 2
CentOS7

Should I be able to change the 'Content-Type' = header on a template using something like:

[setmimeheader = name=3DContent-Type&value=3Dapplication/json; = charset=3Dutf-8]

I can't get it to work.  I have to use a = htaccess file to set the header on the template

<FilesMatch = "my-template.tpl">
   AddType application/json = tpl
</FilesMatch>
=

It means I can't serve out different content = types from the one template. This appears to be possible in PHP.  = Do I need to change an Apache setting or something to = allow this?

Thanks
- Tom

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_7D6C379F-2257-45E8-A68C-9D574478DEC7-- . Michael Davis

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

all db's in one folder and protected (1998) WebCat2 beta 11 - new prefs ... (1997) Not really WebCat (1997) WCS Newbie question (1997) XML version of WebDNA docs? (2000) WebCat2b12 - nesting [tags] (1997) OSX (2003) OR-searching (2000) many-to-one problem (1998) [Sum] function? (1997) html being uncooperative (2000) WebCatalog for Postcards ? (1997) Hard Questions ? (1997) RE: Still Learning (1997) Summary layout (1997) migrating from MacOS to unix (2000) [OT] Apple and 128bit SSL (2003) [Webcat 2]Next (1997) Fun with Dates - any progress? (1997) Just Testing (1997)