views:

152

answers:

1

The last two days we've been going over this problem for several hours to figure out what's going on and we can't find any clues. Here's what's happening; We have a Flash application that allows people to place orders. Users configure a product and an image of that product is generated by Flash on the fly and presented to the user. When satisfied, they can send an order to the server. A byte array of the image and some other variables are sent to the server which processes the order and generates a PDF with a summary of the order and the image of the product. The order script then sends everything back to the browser.

This is all going really well, except for Safari on OSX 10.4. Occasionally the order comes through but most of the time Safari hangs. When looking at the Activity window in Safari it states that it's waiting for the order script and that it's "0 bytes of ?". We thought there was something wrong with the server so we've tried several other servers but the problem persists. Initially we used a simple post to process the order but, in an effort to solve this problem we resorted to some more sophisticated methods as Flash remoting via AMFPHP. This didn't solve the problem either.

We use Charles to monitor the http trafic to figure out whether the requests are leaving the browser at all but the strange thing is that when Charles is running, we can't reproduce the problem.

I hope someone has any clue what's happening because we can't figure it out.

+1  A: 

just a wild guess:

Is getting the PDF back the result of 1 http request that both sends all needed data to the server and gets the pdf as a result? Otherwise this could be a timing issue - are you sure all data is available at the server the moment the pdf is being requested? The number of allowd parallel connections to a website is not the same for all browser brands/versions, and maybe that could influence the likelyhood of a 'clash' happening.

Easy test: introduce a delay between sending the data to the server and retrieving the pdf and see if that has any effect.

Simon Groenewolt
Thanks Simon, I think it's worth it to give that a try. It's not really one request, but two. The first sends all the image data and gets a response with a token to make the second request. The second request contains some more order variables. The PDF is the response to the second request.So far, it has always been that if the first request comes through, the second does too and the PDF is also generated, sent and received.
Abel
I've got some updates on this problem. We've been fiddling around with the timing a bit. It seems to be a big step towards the solution.Currently we're getting errors in Acrobat saying "Insufficient data for an image", but we haven't been able to reproduce the bug on any machine anymore.
Abel