Re: Response.body and file content different? (General questions)
I would say this is almost impossible, ...
maybe it's a little bug?
It seems to depend on the order of reading the propertys.
Here's what I wrote:
Dim C1 As String
Dim C2 As String
If ErrorCode = 0 Then
C2 = wodHttp1.Response.Body
C1 = f_ReadFile(wodHttp1.Response.FileName)
If C1 <> C2 Then
MsgBox files are different
Else
MsgBox files are equal
End If
Else
txtResponse.Text = ErrorText
End If
The f_ReadFile function is only a short binary read like this:
FF = FreeFile
Open strFile For Binary Access Read As #FF
C = Space$(LOF(FF))
Get #FF, , C
Close #FF
If you create an EXE and start it, you will get different results on the FIRST TRY. If you click again the button, it will work.
After closing the EXE and restart again, the effect will repeat.
If I exchange the C1/C2 lines like this...
C1 = f_ReadFile(wodHttp1.Response.FileName)
C2 = wodHttp1.Response.Body
...it will work correctly every time.
I can send the complete sample to you if you like.
Teddy
Complete thread:
- Response.body and file content different? - teddy1969, 2005-09-22, 13:17
- Re: Response.body and file content different? - wodSupport, 2005-09-22, 13:24
- Re: Response.body and file content different? - teddy1969, 2005-09-22, 13:43
- Re: Response.body and file content different? - wodSupport, 2005-09-22, 13:49
- Re: Response.body and file content different? - teddy1969, 2005-09-22, 16:29
- Re: Response.body and file content different? - wodSupport, 2005-09-23, 05:58
- Re: Response.body and file content different? - teddy1969, 2005-09-22, 16:29
- Re: Response.body and file content different? - wodSupport, 2005-09-22, 13:49
- Re: Response.body and file content different? - teddy1969, 2005-09-22, 13:43
- Re: Response.body and file content different? - wodSupport, 2005-09-22, 13:24