Hey there, I'm new to java and I wanted to try a simple socket program, but I'm having difficulties with a certain part of it.
I have a string like this:
Which I got by sending the browser request to my program(a proxy basically). What I want to do now is connect through a socket to the host, in this case google.com, and send back the response I get to the browser so the html would show up.
My problem is in the parsing of the "HTTP request", does anyone knows about a class that could parse that string? So I wouldn't need to spend time making a parsing class, as it's not my focus in that program.
If anyone could help I'd be glad, thanks.
I have a string like this:
GET http://www.google.com/ HTTP/1.1
Which I got by sending the browser request to my program(a proxy basically). What I want to do now is connect through a socket to the host, in this case google.com, and send back the response I get to the browser so the html would show up.
My problem is in the parsing of the "HTTP request", does anyone knows about a class that could parse that string? So I wouldn't need to spend time making a parsing class, as it's not my focus in that program.
If anyone could help I'd be glad, thanks.