Alan de Freitas wrote:
We're deciding on the max size for URLs in our Boost.URL proposal.
I have a webmail system that converts email attachments (e.g. images) to data: URLs; for that, 2^16 would be too small. I've recently had an application where a request was logically a GET, but had to be implemented as a POST (with the data in the request body) because the parameter data size could exceed the URL length limit imposed by some part of the system; in this case the max length would have been more than 2^16 but less than 2^20 bytes I think. On that basis I'd suggest that you need to store 32-bit offsets. Note that I'm not convinced that your approach of parsing and storing all of these offsets when the URL object is created is necessarily the best approach. An alternative would be to parse to determine that the string is a valid URL but store few or none of the offsets; then re-scan to find the URL parts if needed later. There's an obvious trade off between object size and accessor complexity. Regards, Phil.