This commit is contained in:
parent
a11ceecfd3
commit
dc6a910fb1
1 changed files with 3 additions and 2 deletions
|
@ -851,12 +851,13 @@ while True:
|
|||
try:
|
||||
for i in command:
|
||||
parse = urlparse(i)
|
||||
unparsed = i
|
||||
while True:
|
||||
if parse.scheme == "gemini":
|
||||
gsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
gemsocket = ssl.wrap_socket(gsocket)
|
||||
gemsocket.connect((parse.hostname, 1965))
|
||||
gemsocket.send(bytes(i + "\r\n", "UTF-8"))
|
||||
gemsocket.send(bytes(unparsed + "\r\n", "UTF-8"))
|
||||
received = ""
|
||||
while True:
|
||||
gemresponse = gemsocket.recv(2048)
|
||||
|
@ -872,8 +873,8 @@ while True:
|
|||
if firstline:
|
||||
if i.split(" ")[0][0] == "3":
|
||||
redirected = True
|
||||
print("redirect -> " + str([i.split(" ")[1]]))
|
||||
parsed = urlparse(i.split(" ")[1])
|
||||
unparsed = i.split(" ")[1]
|
||||
break
|
||||
elif i.split(" ")[0][0] != "2":
|
||||
title = True
|
||||
|
|
Loading…
Add table
Reference in a new issue