troubleshooting Question

Upload Form Question

Avatar of CyrexCore2k
CyrexCore2kFlag for United States of America asked on
Web Languages and StandardsASPPHP
14 Comments1 Solution561 ViewsLast Modified:
I am literally beating my head against a wall trying to figure out what is going on with my upload form. Here's the html source for the uploading form.

<html>
<head>
<title>Upload Wizard</title>
<script language="javascript" type="text/javascript">
</script>
</head>
<body>
    <form method="post" enctype="multipart/form-data" action="savefile.asp">
<table>
    <tr>
        <td class="cellTitle">Full Size: </td>
        <td><input type="file" id="filename1" name="filename1" /></td>
    </tr><tr>
        <td class="cellTitle">Small Size: </td>
        <td><input type="file" id="filename2" name="filename2" /></td>
    </tr><tr>
        <td class="cellTitle">Thumbnail Size: </td>
        <td><input type="file" id="filename3" name="filename3" /></td>
    </tr><tr>
        <td>&nbsp;</td>
        <td><input type="submit" value="Upload File" /></td>
    </tr>
</table>
    </form>
</body></html>


Which is simple enough. For testing I've just been trying to upload one file. Something REALLY weird is happening. One file uploads just fine while the other file fails and FF says "Connection to the server was reset" and IE says "This page cannot be displayed." I have looked at the packets going back and forth and here's what's happening with the file that works. (<Client> <Server> and <Binary Data> are tags I have added in for informational purposes.)

<Client>
POST /secureaquotecombackoffice/savefile.asp HTTP/1.1
Host: 75.49.137.241
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://75.49.137.241/secureaquotecombackoffice/uploadform.asp
Cookie: Aff%5FSiteCookie=Aff%5FSubAffiliateID=&Aff%5FAffiliateID=; ASPSESSIONIDQSCDDSDR=JBLDCONCAOBKDBHFNFGAPJEJ
Content-Type: multipart/form-data; boundary=---------------------------3236872634985
Content-Length: 48112

-----------------------------3236872634985

Content-Disposition: form-data; name="filename1"; filename="Advert1Small.jpg"
Content-Type: image/jpeg

<Binary Data>
</Client>

<Server>
100 Continue
Server: Microsoft-IIS/5.0
Date: Mon, 26 Feb 2007 19:13:28 GMT
X-Powered-By: ASP.NET
</Server>

<Client>
<Binary Data>
-----------------------------3236872634985

Content-Disposition: form-data; name="filename2"; filename=""
Content-Type: application/octet-stream


-----------------------------3236872634985

Content-Disposition: form-data; name="filename3"; filename=""
Content-Type: application/octet-stream


-----------------------------3236872634985--
</Client>

<Server>
HTTP/1.1 204 No Content
Server: Microsoft-IIS/5.0
Date: Mon, 26 Feb 2007 19:13:28 GMT
X-Powered-By: ASP.NET
Content-Length: 59
Content-Type: text/html
Cache-control: private

<html><body><h1> HTTP/1.1 204 No Content</h1></body></html>
</Server>

Now with the file that fails.

<Client>
POST /secureaquotecombackoffice/savefile.asp HTTP/1.1
Host: 75.49.137.241
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://75.49.137.241/secureaquotecombackoffice/uploadform.asp
Cookie: Aff%5FSiteCookie=Aff%5FSubAffiliateID=&Aff%5FAffiliateID=; ASPSESSIONIDQSCDDSDR=JBLDCONCAOBKDBHFNFGAPJEJ
Content-Type: multipart/form-data; boundary=---------------------------25385769621668
Content-Length: 119256


-----------------------------25385769621668
Content-Disposition: form-data; name="filename1"; filename="Advert1Main.jpg"
Content-Type: image/jpeg

<Binary Data>
</Client>

<Server>
HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.0
Date: Mon, 26 Feb 2007 19:13:30 GMT
X-Powered-By: ASP.NET
</Server>

<Client>
<Binary Data>
</Client>

<Server>
HTTP/1.1 204 No Content
Server: Microsoft-IIS/5.0
Date: Mon, 26 Feb 2007 19:13:30 GMT
X-Powered-By: ASP.NET
Content-Length: 59
Content-Type: text/html
Cache-control: private

<html><body><h1> HTTP/1.1 204 No Content</h1></body></html>
HTTP/1.1 400 Bad Request
Server: Microsoft-IIS/5.0
Date: Mon, 26 Feb 2007 19:13:30 GMT
Content-Type: text/html
Content-Length: 98

<html><head><title>Bad Request</title></head><body><h1>HTTP/1.1 400 Bad Request</h1></body></html>
</Server>

Can anyone tell me what could cause this? I wasn't aware that a files contents could make or break a web browser request.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 14 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros