how to deal with recieve a large file ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to deal with recieve a large file ?

vincent cui

All:’

I develop embedded web server with socket API, there is a file upload function, the web function code is following

<form action="xhrfwfilepost.htm" method="post" enctype="multipart/form-data">

    <label for="file">File Upload Test</label>

    <input type="file" name="file" />

    <input type="submit" name="submit" value="Submit" />

  </form>

 

I capture TCP and HTTP packets with wireshark and find that the POST xhrfwfilepost.htm requested is captured in TCP level. Not HTTP level

It means that I need write a thread with TCP API to receive file ?, is there a sample for it ?

Attached file is a whole of PCAP file.

 

Untitled.png

 

Vincent


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

filetrans.pcap (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: how to deal with recieve a large file ?

Kieran Mansley
On Wed, 2012-07-25 at 07:46 +0000, vincent cui wrote:
> I capture TCP and HTTP packets with wireshark and find that the POST
> xhrfwfilepost.htm requested is captured in TCP level. Not HTTP level
> It means that I need write a thread with TCP API to receive file ?, is
> there a sample for it ?
> Attached file is a whole of PCAP file.

I think you're just misunderstanding the way wireshark is presenting the
data.  An HTTP request is encapsulated in a TCP segment.  A large HTTP
response might span multiple TCP segments.  The subsequent ones might be
presented by wireshark as just being TCP but they are continuations of
the previous HTTP response.

Kieran


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users