Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Delphi & Winsock & HTML

Posted on 1997-04-28
1
Medium Priority
?
415 Views
Last Modified: 2010-04-04
I try to make a sort of web browser, but I have the following problem: The token

HEAD /index.html

is not accepted by all servers. I'm sure the file is on the
server, but the program tells me "Bad request". Why ?
What is my mistake ?

Also, can somebody show me a little example for
WSAAsyncgethostbyname ?
I'm interested in using this command to prepare the
parameters for the connect() instruction.

Thanks in advance.
0
Comment
Question by:dante042897
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
alona041797 earned 200 total points
ID: 1335759
First, the HTTP command you should use is:

  HEAD / HTTP/1.1
  (add more headers here such as Accept)

If you get a response starting with "5", the sever does not suppourt HTTP/1.1 use HTTP/1.0 or HTTP/0.9 instead.

  GET / HTTP/1.0
  (add more headers here such as Accept)

  or

  GET /

In regard to using WinSock, why not use one of the freeware components from the DSP (I suggest socks and/or wsock100):

http://sunsite.icm.edu.pl/delphi/

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

647 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