Safari on IOS ajax request in segmented frames
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Safari on IOS ajax request in segmented frames
by Eugeny ·
For me it looks like Chrome sends data within single frame, but safari may split to two. And the first cause coming to my mind is that your W5500 code waits for data arrival, takes it further and does not check for more data arrival before considering the first chunk of data. If I am corrent the problem is in your W5500 driver code which expects whole data arrival through first reading of non-zero RX_RSR, while it is not the case and more data will arrive later.
RE: RE: Safari on IOS ajax request in segmented frames
by pistoletov1974 ·
Thank you for reply @Eugeny . I discovered that problem appeare when I connect to http server on w5500 from ios device. Chrome on IOS device have the same problem. But safari on Mac book work fine. I did not write recv function. I just take it from wiznet http server library. IOS tcp stack may be split in 2 packets ajax request. Where I can read full size of http packet?
RE: Safari on IOS ajax request in segmented frames
by Eugeny ·
The problem is not in library, it is in logic of your code. Library returns data or pointers available at the specific time, but it is your application logic to decide if that you have received is a complete data, and you must go to
recvfunction again and wait for more information (with timeout of course). For example, HTTP response ends with CRLFCRLF, and whatever number of times recv returns with data, application must call it again until receives this magic sequence, only after this HTTP response is deemed complete, and application will base its behavior on the contents of this HTTP response. Before this full data receive happens, HTTP response data should be considered as invalid.RE: Safari on IOS ajax request in segmented frames
by pistoletov1974 ·
@Eugeny what size receive recvsize = getSn_RX_RSR(sn); when the first segment of packet received?
Only size of first part (segment) ? After that i must parse http packet and decide does i need another parts of http packet ? and call recv function to catch rest of data?
I suppouse that packets with relative sequence number glued in wiz buffer because http is 7 level, may be i am wrong?
This is recv function recv function
RE: Safari on IOS ajax request in segmented frames
by Eugeny ·
Normally yes.
Correct.
You do not deal with “packets” if you use socket in TCP mode, you just deal with count of bytes in the buffer and the data in the buffer.