Re: [WebDNA] Should I be able to use [setmimeheader =?UTF-8?Q?=20name=3DContent-Type=20=3F?=

This WebDNA talk-list message is from

2018


It keeps the original formatting.
numero = 114401
interpreted = N
texte = 2020 or rather: SetHandler webcatalog2-handler Header set Content-Type "application/json" On 2018-09-14 11:29, dbrooke@euca.us wrote: > That all makes sense (and happy to hear that the Server fix is still=20 > there). > > I guess it still proposes a problem for Tom. In the very old days, > we didn't have the mod_mime module and could override any WebDNA > file's content type. > > > Tom, I'd be interested to hear what your solution is.. maybe > something like this in your webdna config file: > > > SetHandler webcatalog2-handler > Header set Content-Type "application/json" > > > > > Donovan > > > > > On 2018-09-13 00:50, christophe.billiottet@webdna.us wrote: >> We ran a few quick tests with WebDNA Server 8.6.1, and >> [setmimeheader] worked fine. We put this in our test2.dna file: >> >> [setmimeheader name=3DWebDNATest&value=3DABC123] >> >> And then opened Chrome=E2=80=99s developer mode, refreshed, and the va= lue >> properly shows up. >> >> >> However, we did notice we couldn't use the [setmimeheader] example >> straight from the WebDNA website without adjusting this config: >> [setmimeheader name=3DContent-Type&value=3Dtext/html;=20 >> charset=3Diso-8859-1] >> >> This didn't work because this line was in the Apache configuration: >> >> AddType text/html .tpl .dna >> >> >> The mime_module is overriding the Content-Type from WebDNA. If we >> comment out the AddType line in the Apache config file, and restart >> apache, then WebDNA will be able to modify the Content-Type. >> >> ------- >> >> Regarding question #2, it depends if you are using FastCGI WebDNA: >> >> FastCGI version only looks for the following mime headers: >> {"HTTP_HOST" , >> "HTTP_USER_AGENT" , >> "HTTP_ACCEPT" , >> "HTTP_ACCEPT_LANGUAGE" , >> "HTTP_ACCEPT_ENCODING" , >> "HTTP_ACCEPT_CHARSET" , >> "HTTP_KEEP_ALIVE" , >> "HTTP_CONNECTION" , >> "HTTP_COOKIE" , >> "HTTP_CACHE_CONTROL" >> , "CONTENT_TYPE" >> }; >> >> >> The WebDNA Server plugin will send everything. We will fix this in >> the FastCGI. >> >> - chris >> >> >> >>> On Sep 12, 2018, at 00:56, Stuart Tremain=20 >>> wrote: >>> >>> Mmmmmm, that explains why I had a similar problem. Ended up=20 >>> changing the extension and doing it through the server. >>> >>> Regards >>> Stuart Tremain >>> >>> Pharoah Lane Software >>> 7/76 Reserve Road >>> Artarmon NSW 2064 >>> AUSTRALIA >>> +612 8971 4431 >>> >>> On 12 Sep 2018, at 3:16 am, Donovan Brooke wrote: >>> >>>> I fixed a bug long ago regarding being able set headers using=20 >>>> setmimeheader in the server app... maybe the fix was reverted? I=20 >>>> think there was another fix or two that was reverted in the plugin,=20 >>>> unfortunately. >>>> >>>> D. Brooke Mobile >>>> >>>> On Sep 11, 2018, at 11:10 AM, Tom Duke =20 >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> WebDNA 8.6.1 Server >>>>> Apache 2 >>>>> CentOS7 >>>>> >>>>> Should I be able to change the 'Content-Type' header on a=20 >>>>> template using something like: >>>>> >>>>> [setmimeheader name=3DContent-Type&value=3Dapplication/json;=20 >>>>> charset=3Dutf-8] >>>>> >>>>> I can't get it to work. I have to use a htaccess file to set the=20 >>>>> header on the template >>>>> >>>>> >>>>> AddType application/json tpl >>>>> >>>>> >>>>> It means I can't serve out different content types from the one=20 >>>>> template. This appears to be possible in PHP. Do I need to change=20 >>>>> 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 --------------------------------------------------------- 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 . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Should I be able to use [setmimeheader =?UTF-8?Q?=20name=3DContent-Type=20=3F?= (dbrooke@euca.us 2018)
2020 or rather: SetHandler webcatalog2-handler Header set Content-Type "application/json" On 2018-09-14 11:29, dbrooke@euca.us wrote: > That all makes sense (and happy to hear that the Server fix is still=20 > there). > > I guess it still proposes a problem for Tom. In the very old days, > we didn't have the mod_mime module and could override any WebDNA > file's content type. > > > Tom, I'd be interested to hear what your solution is.. maybe > something like this in your webdna config file: > > > SetHandler webcatalog2-handler > Header set Content-Type "application/json" > > > > > Donovan > > > > > On 2018-09-13 00:50, christophe.billiottet@webdna.us wrote: >> We ran a few quick tests with WebDNA Server 8.6.1, and >> [setmimeheader] worked fine. We put this in our test2.dna file: >> >> [setmimeheader name=3DWebDNATest&value=3DABC123] >> >> And then opened Chrome=E2=80=99s developer mode, refreshed, and the va= lue >> properly shows up. >> >> >> However, we did notice we couldn't use the [setmimeheader] example >> straight from the WebDNA website without adjusting this config: >> [setmimeheader name=3DContent-Type&value=3Dtext/html;=20 >> charset=3Diso-8859-1] >> >> This didn't work because this line was in the Apache configuration: >> >> AddType text/html .tpl .dna >> >> >> The mime_module is overriding the Content-Type from WebDNA. If we >> comment out the AddType line in the Apache config file, and restart >> apache, then WebDNA will be able to modify the Content-Type. >> >> ------- >> >> Regarding question #2, it depends if you are using FastCGI WebDNA: >> >> FastCGI version only looks for the following mime headers: >> {"HTTP_HOST" , >> "HTTP_USER_AGENT" , >> "HTTP_ACCEPT" , >> "HTTP_ACCEPT_LANGUAGE" , >> "HTTP_ACCEPT_ENCODING" , >> "HTTP_ACCEPT_CHARSET" , >> "HTTP_KEEP_ALIVE" , >> "HTTP_CONNECTION" , >> "HTTP_COOKIE" , >> "HTTP_CACHE_CONTROL" >> , "CONTENT_TYPE" >> }; >> >> >> The WebDNA Server plugin will send everything. We will fix this in >> the FastCGI. >> >> - chris >> >> >> >>> On Sep 12, 2018, at 00:56, Stuart Tremain=20 >>> wrote: >>> >>> Mmmmmm, that explains why I had a similar problem. Ended up=20 >>> changing the extension and doing it through the server. >>> >>> Regards >>> Stuart Tremain >>> >>> Pharoah Lane Software >>> 7/76 Reserve Road >>> Artarmon NSW 2064 >>> AUSTRALIA >>> +612 8971 4431 >>> >>> On 12 Sep 2018, at 3:16 am, Donovan Brooke wrote: >>> >>>> I fixed a bug long ago regarding being able set headers using=20 >>>> setmimeheader in the server app... maybe the fix was reverted? I=20 >>>> think there was another fix or two that was reverted in the plugin,=20 >>>> unfortunately. >>>> >>>> D. Brooke Mobile >>>> >>>> On Sep 11, 2018, at 11:10 AM, Tom Duke =20 >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> WebDNA 8.6.1 Server >>>>> Apache 2 >>>>> CentOS7 >>>>> >>>>> Should I be able to change the 'Content-Type' header on a=20 >>>>> template using something like: >>>>> >>>>> [setmimeheader name=3DContent-Type&value=3Dapplication/json;=20 >>>>> charset=3Dutf-8] >>>>> >>>>> I can't get it to work. I have to use a htaccess file to set the=20 >>>>> header on the template >>>>> >>>>> >>>>> AddType application/json tpl >>>>> >>>>> >>>>> It means I can't serve out different content types from the one=20 >>>>> template. This appears to be possible in PHP. Do I need to change=20 >>>>> 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 --------------------------------------------------------- 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 . dbrooke@euca.us

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:

File upload (2002) This list needs a digest: rant, rave... (1997) Searching an Email database (1997) Running 2 two WebCatalog.acgi's (1996) 2.0 Info (1997) WebCatalog 3.0.4 alias crash bug? (2000) [WebDNA] WebDNA on Mac/intel and Apache 2 (2008) WebMerchant 1.6 and SHTML (1997) Two prices in shoppingcart? (1997) [WebDNA] shopping sites and the "old commerce tags" (2012) international time (1997) Re:E-mailer application times out (1998) RE: Lookup Notfound (1998) Plugin or CGI or both (1997) Claris HomePage messes up the code (1997) newcart (1997) Authenticate (1997) 2.0 Info (1997) WebMerch/Emailer Error (1998) OT: Website Promotion (1998)