File Attachment line endings mangled

Ken Horovatin ken.horovatin at autodesk.com
Mon Feb 27 20:58:12 UTC 2006


We're using QMTest to automate the testing of a web API. I've written a
resource class that is used to copy test files to the server under test.
My current development is done on Windows, but I will need to support
*nix going forward.
 
The problem I'm facing is that, when the file attachments (all text) are
copied to the attachment store in the test database, something is
mangling the files: files that use a Unix line-end are copied to the
store unmolested, but files with a DOS line-end (CRLF) end up with
mangled line ends (i.e. the CRLF seems to be reversed to a LFCR). As a
result, the tests fail.
 
I've tried tracing through the source, but, being a Python neophyte, I'm
getting lost before finding the likely cause.
 
My guess is that there is some issue with the HandleUploadRequest method
when used with DOS line ends, but I've reached the limits of my
understanding.
 
Can anyone offer a hint as to where I should look to solve this problem?
 
Cheers,
Ken Horovatin



More information about the qmtest mailing list