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

This WebDNA talk-list message is from

2018


It keeps the original formatting.
numero = 114400
interpreted = N
texte = 2019 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=20 didn't have the mod_mime module and could override any WebDNA file's=20 content type. Tom, I'd be interested to hear what your solution is.. maybe something=20 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 val= ue > 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 changing=20 >> 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 template=20 >>>> 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 . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Should I be able to use [setmimeheader =?UTF-8?Q?name=3DContent-Type=20=3F?= (dbrooke@euca.us 2018)
2019 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=20 didn't have the mod_mime module and could override any WebDNA file's=20 content type. Tom, I'd be interested to hear what your solution is.. maybe something=20 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 val= ue > 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 changing=20 >> 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 template=20 >>>> 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 . 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:

[WebDNA] WebDNA Hosts (2009) did I miss anything (1997) [WebDNA] Secure Cookies (2020) Shopping carts and reloading pages (1997) Complex search (2002) WebDNA Solutions --> Date format suggestions (1998) Plugin or CGI or both (1997) Shipcost Prob solved, new one arises (1998) Requiring that certain fields be completed (1997) WebCat2final1 crashes (1997) HELP WITH DATES (1997) Sku numbers (1997) Location of Webcat site in folder hierarchy (1997) Error Messages Returned to User (1997) does summ effect blank fields? (1998) Almost a there but..bye bye NetCloak (1997) Emailer Chokes on bad address (1997) unbreakable space on windows (2008) [showif] / [hideif] (1997) Re:redirect from the errorsMessages.db entry (1997)