I read that HTTP Pipelining is not activated by default in modern browsers
How can I implement a Persistent HTTP Connection with Pipelining in Python (like code socket from scratch) without using requests
library to download all pdf file in folder slides
from http://web.stanford.edu/class/cs224w/slides/
I tried to send request from scratch many times just using import Socket
and Threading
(because I don't able to use requests
lib or anything else like requests
to automatically send request) but don't gain any result.
I made a TCP socket connection like this
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((host, port))
After that I make many sending-thread
with the request with the format like this:
request = f"GET {path}{file_name} HTTP/1.1\r\nHost:{host}\r\nConnection: Keep-Alive\r\n\r\n"
Then I make many receiving-thread
to receive data but Host return the response by turn.