Solved

CGIs returning EMBED tags

Posted on 1997-04-06
2
231 Views
Last Modified: 2013-12-25
Might as well try here I guess...nobody else seems to know!

System: Enterprise server 2.01, running under Solaris 2.5

I'm generating an HTML file using a vanilla-standard CGI C program, which includes an EMBED tag.  When I run this, browsing using Navigator 3.0 running under W95, the browser trys to launch PLAY32.EXE to run the file, rather than using the correct plug-in (in this case Quicktime).  If I simply copy the HTML from the browser source window, and re-load that, from the server, not locally, everything works fine.

This leads me to think that there's one of two things wrong: first, maybe I need to do something clever with the http header, although inspecting the header in the non-CGI version through telnet, I can't see anything particularly clever. Secondly, perhaps I need to parse the HTML explicitly or something, but I don't know how.

I've tried to find some form of technical note which explains how the EMBED tag is handled on the server side, but no luck yet.

So if anybody has any suggestions for me, i would love to hear them.

Thanks,

David Mantripp
0
Comment
Question by:drm
2 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1827883
Just a blind guess:
does your server send back the right mime type?

Rgds, julio
0
 
LVL 1

Accepted Solution

by:
topaz56 earned 200 total points
ID: 1827884
Good question...let's see if we can logic this out..

If a browser sees an EMBED tag(1)
& the browser has plugins enabled(2)
& it can locate any plugin that matches (3),
it will execute the command w/in the <embed> tags.

It will also work if it can't match the plugin MIME type, but the OS can match the registered filename extension. (I think that this is the problem)

In addition, there is some weird behavior on Solaris 2.5.x that involves setting the hidden tag to "true"

If you have a hidden tag set to "true" you shouldn't see anything, but you launch PLAY32.EXE, so that's probably not the problem. (1) The browser apparently sees the <embed> tag, else
nothing would happen. I'm assuming that the QT plugin is available (2) because it works from the server. So, (3) the server is not sending the correct MIME type & instead, the OS
looks at your file extension.

I think that to fix this in Enterprise 2.0, from the server manager you need to edit the _load-types_ section of the obj.conf file, by adding the QT MIME type to _local-types_ using an expression like:

Init fn=load-types mime-types [path to file "mime.types" <--contains the MIME types that tou are serving]

Hope this helps...
Havn't worked that much with NS servers.

Best, Tom
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question