Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CGIs returning EMBED tags

Posted on 1997-04-06
2
Medium Priority
?
235 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 600 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

876 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