Solved

CGIs returning EMBED tags

Posted on 1997-04-06
2
221 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logiā€¦
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now