**reading url from browser using qt** -


i'm trying develop application listens specific port (for example 9999) in localhost. how retrieve url when user types <127.0.0.1:9999/somedir> in web browser?

to retrieve url have implement pieces of http protocol.

this official documentation of http protocol.

if want path of entered url, can parse of request data. following example of http request made browser:

get /index.html http/1.1 host: www.example.com 

the first word @ first line command performed. next, path @ server, , protocol , version. next line (at example) specify host. used example server provide many web sites. feature called virtual host.

it important note each line of http request , response separated \r\n characters.

take @ http protocol on wikipedia. start implement basic functionality.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -