[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Delphi & Winsock & HTML

Posted on 1997-04-28
1
Medium Priority
?
416 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
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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month19 days, 21 hours left to enroll

873 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