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:

What file? (1997) Multiple Items (2004) WebCat editing, SiteGuard & SiteEdit (1997) RE: Forcing Paragraph Breaks on Results - Yes you can replace String for String! (1998) uploads (2000) Web Catalog 2 demo (1997) Bug? (1997) Quickie question on the email templates (1997) WebCat2b12 - nesting [tags] (1997) Nesting FoundItem Context (1997) Passing Variable (was How to add product size) (1997) Extended [ConvertChars] (1997) Multiple Hideif peramiters (2001) [url] (1997) Exclude by date - multiple (1997) Purchase Plugin Missing (1996) [if] (2003) WebCat2: Items xx to xx shown, etc. (1997) WebDNA Trouble... (1999) webDNA on centos (2008)