views:

33

answers:

2

Meaning will it work fine? I have a situation where I am attaching files via HTTP attachment by attaching the URI of the file and it is on a different server so I don't have access to the length of the file.

+2  A: 

It will work fine. The client will just read to EOF. The client only won't be able to calculate/estimate the progress of download.

BalusC
A: 

It may work fine but the HTTP spec states that applications SHOULD send the length if it's possible to determine:

Applications SHOULD use this field to indicate the transfer-length of the message-body, unless this is prohibited by the rules in section 4.4.

Any Content-Length greater than or equal to zero is a valid value. Section 4.4 describes how to determine the length of a message-body if a Content-Length is not given.

Note that the meaning of this field is significantly different from the corresponding definition in MIME, where it is an optional field used within the "message/external-body" content-type. In HTTP, it SHOULD be sent whenever the message's length can be determined prior to being transferred, unless this is prohibited by the rules in section 4.4.

Ivo van der Wijk