Comment 4 for bug 750274

Revision history for this message
Abel Deuring (adeuring) wrote :

This looks as being caused by a very fast response from the server:

The client wants to upload a zero-length file, so it only needs to send the header lines, and to finish the headers with an empty line. No other data will be transferred.

The exception is raised in _checkError(), called from _sendLine('') in addFile(). That's the empty line saying "all headers sent". Since no further data is sent, the server can respond immediately, but the client considers any response seen in the _checkError() call in _sendLine() as an error notification.

We should simply not do the error check in the _sendLine('') call when a zero-length file is uploaded. The 200 response is correct, but it is supposed to be read at line 188 in addFile()