[Interest] Get the username:password part of a HTTP request from QTcpSocket
thiago.macieira at intel.com
Sun Dec 1 18:36:00 CET 2013
On domingo, 1 de dezembro de 2013 17:11:20, Lucas Betschart wrote:
> I have a HTTP-Server based on QTcpServer.
> Do you have an idea how I could get the authority part of the HTTP request?
> A request might look like this:
> >From the incomming QTcpSocket I can only get the IP, the port number and
> the data (which includes the query string for HTTP but not the
> authentication part). How can I get the rest of the request?
They're part of the HTTP headers that you received. Take a look at RFC 2616.
You're looking for the Host and Authorization headers.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the Interest