I am trying to build the HTTP request string in the variable "full_req". Here is how a HTTP request looks:
GET /images/logo/ HTTP/1.1
Host: www.google.com
Connection: close
I already wrote python code so if I enter a url, "http://www.google.com/images/logo/googlelogo.png", it will split the url into 3 parts. Below are the variables that I used:
host(containswww.google.com)path(contains/images/logo/)file(containsgooglelogo.png)port(Its showingNonebut I think its suppose to say80)
How do I assign HTTP request string to full_req variable so if I print this variable, it contains all three lines?
print(full_req)
tried string concatenation but it didn't work. I used this resource: http://www.skymind.com/~ocrow/python_string/