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 = 114392
interpreted = N
texte = 2009We 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 =value 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; =charset=3Diso-8859-1]This didn't work because this line was in the Apache configuration:
AddType text/html .tpl .dnaThe 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
=wrote:>=20> Mmmmmm, that explains why I had a similar problem. Ended up changing =the extension and doing it through the server.=20>=20> Regards> Stuart Tremain>=20> Pharoah Lane Software=20> 7/76 Reserve Road=20> Artarmon NSW 2064> AUSTRALIA> +612 8971 4431>=20> On 12 Sep 2018, at 3:16 am, Donovan Brooke wrote:>=20>> I fixed a bug long ago regarding being able set headers using =setmimeheader in the server app... maybe the fix was reverted? I think =there was another fix or two that was reverted in the plugin, =unfortunately.=20>>=20>> D. Brooke Mobile>>=20>> On Sep 11, 2018, at 11: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---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list talk@webdna.usTo unsubscribe, E-mail to: talk-leave@webdna.usarchives: http://www.webdna.us/page.dna?numero=3D55Bug Reporting: support@webdna.us.
Associated Messages, from the most recent to the oldest:
2009We 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 =value 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; =charset=3Diso-8859-1]This didn't work because this line was in the Apache configuration:AddType text/html .tpl .dnaThe 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 =wrote:>=20> Mmmmmm, that explains why I had a similar problem. Ended up changing =the extension and doing it through the server.=20>=20> Regards> Stuart Tremain>=20> Pharoah Lane Software=20> 7/76 Reserve Road=20> Artarmon NSW 2064> AUSTRALIA> +612 8971 4431>=20> On 12 Sep 2018, at 3:16 am, Donovan Brooke wrote:>=20>> I fixed a bug long ago regarding being able set headers using =setmimeheader in the server app... maybe the fix was reverted? I think =there was another fix or two that was reverted in the plugin, =unfortunately.=20>>=20>> D. Brooke Mobile>>=20>> On Sep 11, 2018, at 11: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---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list talk@webdna.usTo unsubscribe, E-mail to: talk-leave@webdna.usarchives: http://www.webdna.us/page.dna?numero=3D55Bug Reporting: support@webdna.us.
christophe.billiottet@webdna.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:
WebCat2b15MacPlugin - showing [math] (1997)
WebCat and image maps (1997)
Ampersand (1997)
Format of Required fields error message (1997)
Sitebuilder (2004)
HTML Editors (1997)
Running _every_ page through WebCat-error.html (1997)
Help SM: Duplicate cart #'s - still! (2003)
How to append text after the sign & (1997)
Setting Cart value (2000)
WebCAT MacOS9 --> OSX (2003)
[WebDNA] [BULK] ampps.com - let webdna be included (2012)
form data submission gets truncated (1997)
Encyption mail (1998)
[WebDNA] my spawned [purchase] seems to be losing the orderfile. ... [MOVEFILE] workaround? (2009)
Uploading out of FMP (2001)
Online reference (1997)
[WebDNA] Cookie Enabled/Disabled (2013)
Javascript/WebCatalog form population (2001)
Firesite and [referrer] atg broke (1997)