Unnecessary URL length limit

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
pjotrb
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-02, 13:11 UTC
Location: The Netherlands

Unnecessary URL length limit

Post by *pjotrb »

Press Ctrl-N to download something using FTP or HTTP.
Paste a http-URL that is longer than 256 characters: it gets chopped.

I don't know if there exists a "path length limit" for FTP; maybe there is.
But for HTTP this is a very short and unnecessary limit.

There are no official standards or guidelines for Max URL length.
Browsers and servers of different vendors all have different limits, see What is the maximum length of a URL.
But compared to all, 256 is very short.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC uses the file system path limit in many places - which is 259 characters. Unfortunately it's not easy to use longer paths in some places and not in others...
Author of Total Commander
https://www.ghisler.com
pjotrb
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-02, 13:11 UTC
Location: The Netherlands

Post by *pjotrb »

ghisler(Author) wrote:TC uses the file system path limit in many places - which is 259 characters
It is okay (and maybe even required) if the resulting file name is chopped.

Example in pseudo code (it's been a while since I last used Delphi :))
Form init procedure:
txtUrl.maxLength := 2000
OK button handler:
strFilename := convertStrangeChars(Left(txtUrl.Text, cFileLimit))
strData := SocketLib.getUrl(txtUrl.Text)
saveFile(strFilename, strData)
Post Reply