Answer the question
In order to leave comments, you need to log in
Why is the request sent incorrectly?
Why is the response coming through the browser and not through telnet? I tried to write my own client (it doesn’t work in C, yes in python, but I need it in C), but does it return the same thing there?
Answer the question
In order to leave comments, you need to log in
I started writing a comment about almost 20 years of http/1.1 existence, but everything is a bit simpler:
https://tools.ietf.org/html/rfc2616#section-14.23
You grossly violated the standard. You presented yourself as an HTTP/1.1 client, but did not pass the Host header required by this standard.
Incorrect client request is code 400, the server answers you correctly.
The minimum possible request for HTTP/1.1 is two lines:
GET /... HTTP/1.1
Host: api.vk.com
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question