?

Log in

No account? Create an account
 

No response from server on upload?

About  

Previous Entry No response from server on upload? Jul. 25th, 2004 @ 11:33 am Next Entry
While it's entirely posssible that my FotoBilder client (SVN-42 as I write) is quite b0rken, I seem to be getting a lot of incidents where I get *no* acknowledgement from the server (no HTTP headers or body)- although the image uploads sucessfully. Either I've made an error in the socket handling, or the server's being incredibly recalcitrant.

If anyone's familiar with PHP and can eyeball the HTTP transmit code, it's the function http_request->send() in backend/core/httpfuncs.php that's responsible.
Leave a comment
[User Picture Icon]
From:brad
Date:July 25th, 2004 03:45 pm (UTC)
(Link)
If you send me a tcpdump or ethereal dump file of the network traffic of it not working, I'll look into it.

brad@danga.com
[User Picture Icon]
From:wechsler
Date:July 27th, 2004 11:56 am (UTC)
(Link)
Hmmm - have done the ethereal dump, and compared it with the debug output of my client, it seems that:

1) The results *are* coming back from the server
2) The results are coming back *before* the client's finished sending! (ie there's an HTTP continuation packet from the client to the server *after* the HTTP response packet from the server. This appears to escape PHP's socket-reading, at least when using fputs/fgets.
[User Picture Icon]
From:brad
Date:July 27th, 2004 01:48 pm (UTC)
(Link)
The rationale is that often the server knows ahead of time it has the picture (based on MD5) so it doesn't need to receive the PUT request.

Perhaps we should use HTTP/1.1's "Expect"/"Continue" stuff for this, rather than breaking the HTTP spec as we kinda do now.

You care any to look into that, reading the HTTP/1.1 spec?
[User Picture Icon]
From:wechsler
Date:July 27th, 2004 02:23 pm (UTC)
(Link)
Hrm - wonder if there should be a "Got this yet?" request to save the effort/bandwidth of the upload? Or should we just grab the backup XML file and compare?

As for checking into the spec, I'll certainly take a look out of interest, but I don't suspect that I'll have time to do any real development in that area. (I don't want to make the mistake again of volunteering time and then slowing people down not being able to keep the commitment).

On another note, what's the policy on client announcements in here? As far as it goes, mine's pretty reliable now.
(Leave a comment)
Top of Page Powered by LiveJournal.com