]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/message.cpp
Use string::size_type to store string offsets
[libs/net.git] / source / http / message.cpp
index 21d2c4b5a4ee955d7e8cd24177347ecedcd5f25d..92321e8a87bd4c953f039141724c621c2d977ac2 100644 (file)
@@ -97,7 +97,7 @@ unsigned Message::parse_content(const string &d)
 
 unsigned Message::parse_headers(const string &d)
 {
-       unsigned start = 0;
+       string::size_type start = 0;
        while(1)
        {
                string::size_type lf = d.find('\n', start);
@@ -106,7 +106,7 @@ unsigned Message::parse_headers(const string &d)
                if(lf==start || (d[start]=='\r' && lf==start+1))
                        return lf+1;
 
-               unsigned colon = d.find(':', start);
+               string::size_type colon = d.find(':', start);
                if(colon>lf)
                        throw invalid_argument("Message::parse_headers");