According to the version of FIPS 180 available back in 2005, SHA-1 has an input length limitation, which means there are not an infinite number of messages that are valid SHA-1 inputs to begin with. The reason for this constraint is the padding contains a fixed length input bit length field.
Older algorithm of a similar design, such as MD5MD5, also have fixed length input bit length fields in their padding, but no input length limitations. These hashes consequently have a theoretically infinite number of valid inputs.
Some newer algorithms, such as SHA-3, do not have fixed length input bit length fields in their padding, and consequently do not have any input length limitation.