|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SERVER - Incorrect filename when streaming from server script
Hello,
I'm bringing up an old problem as I see on these forums (and still no solution). I have an application that is supposed to let users download mobile content (ringtones, games) by following a link provided to their handset with a WAP Push. Until now, I haven't been able to figure out a secure solution for this, as the only way the mobile browser will save a correct filename is by linking the resource directly on the server. Seems all mobile browsers completely ignore the Content-Disposition header; any alternate solutions, such as providing a fake url to a non-existent .mp3 (that's being rewritten by an ISAPI module) also have failed. Did anyone find a way to seamlessly stream content from a server script to a mobile handset ? |
|
#2
|
|||
|
|||
|
Ok, I may have a solution. For those using .NET:
You need to create a custom HTTP handler (IHttpHandler interface) and associate it with .mp3 extension (for example). Every request that references an .mp3 file will go through this handler EVEN if the file in the requested URL does not exist! For example if you launch the URL w w w.example.c o m / r i n g. m p 3 you can intercept this request and tamper with it in the above handler, do some operations, like authentication and so on, then stream the file back to the client. The file can be in another location altogether, for example "~/content/mp3s/ring.mp3". That's just an URL coming from the client, with which you can play any way you like, then send some binary content back (plenty of articles about this one on the net) completely transparent to the client, who will think is actually downloading from the requested location. I've tested this with a few downloads and works like charm so far. Good luck to everybody. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Mobile Programming > SERVER - Incorrect filename when streaming from server script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|