plugNPlay has asked for the wisdom of the Perl Monks concerning the following question:

Hi - I have a function that uploads a .mpp file via http. Running on one test box, it functions perfectly. Running on another, MS Project cannot open the file. I've viewed the HTTP logs and the only difference I can see between the successful and the unsuccessful POST is that the successful one contains the Content-Length parameter. Why would the same exact code post the Content-Length on one box and not on another? Here are the POST requests. This one works:
POST http://192.168.1.20:58080/pce8/admin Referer: http://192.168.1.20:58080/pce8/admin Content-Length: 2464200 Content-Type: multipart/form-data; boundary=xYzZY --xYzZY Content-Disposition: form-data; name="op" scheduleOptionsFcn --xYzZY Content-Disposition: form-data; name="op2" submit --xYzZY Content-Disposition: form-data; name="schedName" proj2 --xYzZY Content-Disposition: form-data; name="projValue" 1 --xYzZY Content-Disposition: form-data; name="updatePolicy" 7 --xYzZY Content-Disposition: form-data; name="cleanPolicy" 6 --xYzZY Content-Disposition: form-data; name="maxUpdateAge" 365 --xYzZY Content-Disposition: form-data; name="deactivated" FALSE --xYzZY Content-Disposition: form-data; name="mppFileName" C:\Testbots\unit_test_data\1200task_A_Schedule.mpp --xYzZY Content-Disposition: form-data; name="deactivateDate" --xYzZY Content-Disposition: form-data; name="mppFile"; filename="1200task_A_S +chedule.mpp" Content-Length: 2463232 Content-Type: application/vnd.ms-project (begin binary content)
This one doesn't work:
POST http://192.168.1.20:58080/pce8/admin Referer: http://192.168.1.20:58080/pce8/admin Content-Length: 2464175 Content-Type: multipart/form-data; boundary=xYzZY --xYzZY Content-Disposition: form-data; name="op" scheduleOptionsFcn --xYzZY Content-Disposition: form-data; name="op2" submit --xYzZY Content-Disposition: form-data; name="schedName" proj1 --xYzZY Content-Disposition: form-data; name="projValue" 1 --xYzZY Content-Disposition: form-data; name="updatePolicy" 7 --xYzZY Content-Disposition: form-data; name="cleanPolicy" 6 --xYzZY Content-Disposition: form-data; name="maxUpdateAge" 365 --xYzZY Content-Disposition: form-data; name="deactivated" FALSE --xYzZY Content-Disposition: form-data; name="mppFileName" C:\Testbots\unit_test_data\1200task_A_Schedule.mpp --xYzZY Content-Disposition: form-data; name="deactivateDate" --xYzZY Content-Disposition: form-data; name="mppFile"; filename="1200task_A_S +chedule.mpp" Content-Type: application/vnd.ms-project (binary content)
The functioning box has Windows 2000 Server, the failing box runs Windows 2003 Server. They run identical installations of Perl, have the same libraries, etc. Does anyone know of this problem and have any solutions? My preference is to host my program on the 2003 Server box, but I can't with this issue in the way. Many thanks - PlugNPlay

Replies are listed 'Best First'.
Re: file upload fails on some machines
by atcroft (Abbot) on Aug 11, 2005 at 21:23 UTC

    Since it is normally the little things that I find are capable of jumping about a meter to bite me in the hinder parts, those are the ones I tend to start with. To wit,

    • are uploads permitted on both?
    • do both have the same upload size limit (if such a limit is set)?
    • do the permissions compare on the temporary and upload directories in the webserver configuration? in the filesystem?
    • how do the file sizes compare between the successful and unsuccessful tests?

    Don't know if any of those suggestions will help, but good luck in finding your solution. HTH.

Re: file upload fails on some machines
by kwaping (Priest) on Aug 11, 2005 at 18:26 UTC
    Can you explain more about the corruption of the data? What are the symptoms? Any other details you can think of will help as well.

    (no longer applies)
      Thanks for making me be more specific.