Content Damage

A

athirumurthi

I have a WinINet communicating with an integration server
(X-AspNet-Version: 1.1.4322) using form posts.

One form post that includes jpeg content. However, the data received
at the server is missing bytes from the beginning of the jpeg. It
could be that the whole exif header that has been stripped.

I can upload the same jpeg successfully using a .htm with Internet
Explorer. Using a port sniffer and diff tools, I can verify that the
image content is identical and the final server response is identical.

The integration server occasionally sends "HTTP/1.1 100 Continue"
messages. I noticed that Internet Explorer responds with a single '!'
character. WinINet appears to ignore continue messages.

The Explorer post uses form-encoded content rather than headers.
However, I've been assured that both formats are okay and the server
response is the same.

I've included the successful post and the unsuccessful post below. Any
idea what could cause the content mutilation? Thanks in advance,

- Ashok Thirumurthi


*******************
SUCCESSFUL POST
*******************

00000000: (UDP/IP) Sending Packet, 13.09.2005 10:13:42.093
iexplore.exe (1656)
127.0.0.1:1181 ® 127.0.0.1:1181
Size: 1 bytes

!
00000001: (UDP/IP) Receiving Datagram, 13.09.2005 10:13:42.093
iexplore.exe (1656)
127.0.0.1:1181 ® 127.0.0.1:1181
Size: 1 bytes

!
00000000: (TCP/IP) Sending Packet, 13.09.2005 10:13:42.156
iexplore.exe (1656)
0.0.0.0:1217 ® 65.249.156.108:80
Size: 554 bytes

POST /FileReceiveServer.aspx HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data;
boundary=---------------------------7d54e2ae06e0
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Host: stage.binxfer.fujifilmesys.com
Content-Length: 13400
Connection: Keep-Alive
Cache-Control: no-cache
00000002: (UDP/IP) Sending Packet, 13.09.2005 10:13:42.156
iexplore.exe (1656)
127.0.0.1:1181 ® 127.0.0.1:1181
Size: 1 bytes

!

00000003: (UDP/IP) Receiving Datagram, 13.09.2005 10:13:42.156
iexplore.exe (1656)
127.0.0.1:1181 ® 127.0.0.1:1181
Size: 1 bytes

!

00000001: (TCP/IP) Sending Packet, 13.09.2005 10:13:42.156
iexplore.exe (1656)
0.0.0.0:1217 ® 65.249.156.108:80
Size: 8 Kbytes (8192 bytes)

-----------------------------7d54e2ae06e0
Content-Disposition: form-data; name="f1";
filename="c:\\p2\\ritz\\Flower1.jpg"
Content-Type: image/pjpeg
ÿØÿá
ÑExif..II*...........!...’...........´...........Æ.................<More
image data here>

00000002: (TCP/IP) Receiving Packet, 13.09.2005 10:13:42.218
iexplore.exe (1656)
65.249.156.108:80 ® 0.0.0.0:1217
Size: 25 bytes

HTTP/1.1 100 Continue


00000004: (UDP/IP) Sending Packet, 13.09.2005 10:13:42.390
iexplore.exe (1656)
127.0.0.1:1181 ® 127.0.0.1:1181
Size: 1 bytes

!

00000003: (TCP/IP) Sending Packet, 13.09.2005 10:13:42.390
iexplore.exe (1656)
0.0.0.0:1217 ® 65.249.156.108:80
Size: 5 Kbytes (5208 bytes)

<More image data here>
-----------------------------7d54e2ae06e0
Content-Disposition: form-data; name="Submit1"
Submit Query
-----------------------------7d54e2ae06e0
Content-Disposition: form-data; name="AppKey"
D463-7272-ED59-DEA1
-----------------------------7d54e2ae06e0
Content-Disposition: form-data; name="RequestType"
file20
-----------------------------7d54e2ae06e0
Content-Disposition: form-data; name="BatchID"
11983
-----------------------------7d54e2ae06e0
Content-Disposition: form-data; name="UserID"
125341
-----------------------------7d54e2ae06e0--


00000004: (TCP/IP) Receiving Packet, 13.09.2005 10:13:43.171
iexplore.exe (1656)
65.249.156.108:80 ® 0.0.0.0:1217
Size: 353 bytes

HTTP/1.1 200 OK
Date: Tue, 13 Sep 2005 14:13:38 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Result: SUCCESS
TotalNumOfImages: 1
Set-Cookie: ASP.NET_SessionId=ljv4zie1ixvya0y1kxopvpzb; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 33
Result=SUCCESS&TotalNumOfImages=1



*******************
UNSUCCESSFUL POST
*******************

POST /FileReceiveServer.aspx HTTP/1.1
RequestType: file20
AppKey: D463-7272-ED59-DEA1
UserID: 125341
BatchID: 12052
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data;
boundary=---------------------------7d49538b031e
User-Agent: PictureProject Ritz Uploader
Host: stage.binxfer.fujifilmesys.com
Content-Length: 12908
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASP.NET_SessionId=vonbs445h24wrjumj1ezpp45
00000024: (TCP/IP) Sending Packet, 13.09.2005 09:08:09.796
NkbPProj.exe (2836)
0.0.0.0:1178 ® 65.249.156.108:80
Size: 186 bytes

-----------------------------7d49538b031e
Content-Disposition: form-data; name="f1";
filename="C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\SmartServices\Flower1.jpg"
Content-Type: image/pjpeg


00000025: (TCP/IP) Sending Packet, 13.09.2005 09:08:09.796
NkbPProj.exe (2836)
0.0.0.0:1178 ® 65.249.156.108:80
Size: 4 Kbytes (4096 bytes)

ÿØÿá
ÑExif..II*...........!...’...........´...........Æ.................
<More Image Data Here>

00000026: (TCP/IP) Sending Packet, 13.09.2005 09:08:09.796
NkbPProj.exe (2836)
0.0.0.0:1178 ® 65.249.156.108:80
Size: 4 Kbytes (4096 bytes)

<More image data here>

00000027: (TCP/IP) Sending Packet, 13.09.2005 09:08:09.796
NkbPProj.exe (2836)
0.0.0.0:1178 ® 65.249.156.108:80
Size: 4 Kbytes (4096 bytes)

<More image data here>

00000028: (TCP/IP) Receiving Packet, 13.09.2005 09:08:09.859
NkbPProj.exe (2836)
65.249.156.108:80 ® 0.0.0.0:1178
Size: 25 bytes

HTTP/1.1 100 Continue


00000029: (TCP/IP) Sending Packet, 13.09.2005 09:08:09.859
NkbPProj.exe (2836)
0.0.0.0:1178 ® 65.249.156.108:80
Size: 387 bytes

<More image data here>

00000030: (TCP/IP) Sending Packet, 13.09.2005 09:08:09.890
NkbPProj.exe (2836)
0.0.0.0:1178 ® 65.249.156.108:80
Size: 47 bytes


-----------------------------7d49538b031e--


00000031: (TCP/IP) Receiving Packet, 13.09.2005 09:08:10.281
NkbPProj.exe (2836)
65.249.156.108:80 ® 0.0.0.0:1178
Size: 289 bytes

HTTP/1.1 200 OK
Date: Tue, 13 Sep 2005 13:08:05 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Result: SUCCESS
TotalNumOfImages: 1
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 33
Result=SUCCESS&TotalNumOfImages=1
 
A

athirumurthi

For those who follow, a blank line was missing between the Content-Type
and the image data. That caused the data before the first 0x0A 0x0A
sequence in the image to be interpreted as part of the Content-Type,

- Ashok
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top