Hi there people, Here's the problem. I've written a client-server application that uploads files. It works using raw sockets however this leaves me with a problem, I can't get the Mime Type of the file without using a HTTP method; somthing I don't want to do. Here's another catch, the solution to the problem must work on both a pc and a mac running IE(forgot to mention that the client side applet resides in a browser). If anyone can help here it would be great, and if you could provide a bit of sample code it would be even better. Dec
You may have outclevered yourself. Raw sockets are precisely that: Raw. The MIME type is one of the things that gets sent in the headers of an http transaction - part of that "overhead" you're trying to avoid. To do that with raw sockets, your're just going to have to set aside part of the data stream to hold the content type (MIME type) information. Unless you're running in a well-controlled environment, an http URL connection is more preferable. It isn't as likely to get blocked by firewalls and is more likely to survive crossing hardware and OS lines. A lot of people don't realize it, but MIME and http were designed to be codeset-independent. Originally, internet clients could be running EBCDIC and/or character sets with more or fewer than 8 bits per character. They still can if the server's well-behaved.
An IDE is no substitute for an Intelligent Developer.
Joined: Jul 03, 2001