[Laszlo-user] XML RPC requests return a "application/x-shockwave-flash" data type

Gilad Parann-Nissany gilad.parann.nissany at g.ho.st
Tue Mar 25 07:23:21 PDT 2008



Hi 

In our case it can be pretty big, we do need the performance. 

So the actual response format is truly binary (SWF) and not XML at all? in that case the content-type is correct I guess. 

or is it text wtih just the encoding set to SWF? in that case I guess we could figure a workaround? 

Thank you! 

Gilad 



Gilad Parann-Nissany 

----- Original Message ----- 
From: "Henry Minsky" <henry.minsky at gmail.com> 
To: "Gilad Parann-Nissany" <gilad.parann.nissany at g.ho.st> 
Cc: "laszlo-user" <laszlo-user at openlaszlo.org>, "Yazan Ghandour" <Yazan.Ghandour at corp.g.ho.st>, "Rami Khalayleh" <Rami.Khalayleh at corp.g.ho.st>, "Anas Jadallah" <Anas.Jadallah at corp.g.ho.st>, "Elias Khalil" <Elias.Khalil at corp.g.ho.st> 
Sent: Tuesday, March 25, 2008 3:53:16 PM (GMT+0200) Auto-Detected 
Subject: Re: [Laszlo-user] XML RPC requests return a "application/x-shockwave-flash" data type 

The issue is that the implementation in swf was written to compile the return data as a Flash swf binary file. The implementation for DHTML uses a JSON encoding. The fix for this would need to be to switch to using the JSON encoding with the swf runtime. We do have a JSON parser for SWF7/8, it would be somewhat slower than the direct-to-swf transport being used now, but that might be acceptable if the amount of data you are sending in each request is not very large. 



On Tue, Mar 25, 2008 at 9:33 AM, Gilad Parann-Nissany < gilad.parann.nissany at g.ho.st > wrote: 





Hi all 

We have an app using Laszlo XML RPC rather heaviliy, our version is 4.0.8. 

Looking at the logs one sees that the REQUESTS produced by our client for XML-RPC are of type "application/x-www-form-urlencoded" 

(which makes sense - it is the correct content-type for a POST request). 

However the RESPONSEs are of type "application/x-shockwave-flash" which is strange. 

We would expect the reponse type to be text/xml or something like that. This is creating a real-world problem for us on various consumers e.g. JMeter - which expect the text/xml to function correctly. 

Do you have any experience with this issue? Suggestions or workarounds? 

Detailed info from the logs is below. 

Thanks 

Gilad 

P.S. For example: something like the following response headers 

---------------- 

HTTP/1.1 200 OK 
Expires: Fri, 05 Oct 2001 00:00:00 GMT 
Date: Tue, 25 Mar 2008 11:51:13 GMT 
Server: Apache-Coyote/1.1 
Cache-Control: no-store 
Content-Type: application/x-shockwave-flash 
Content-Length: 437 
Server: Apache-Coyote/1.1 

---------------- 

is returned from the following request: 

---------------- 

POST http://localhost/lps/workspace/VC/client/welcomei.lzx?__lzbc__=1205615513625 

POST data: 
fpv=9%2E115&lzr=swf8&proxied=true&lzpostbody=%3C%3Fxml+version%3D%221%2E0%22%3F%3E%0A%3CmethodCall%3E%0A%3CmethodName%3EClientInfo%2EgetGhostInitInfo%3C%2FmethodName%3E%0A%3Cparams%3E%0A%3Cparam%3E%0A%3Cvalue%3E%3Cstring%3E%3C%2Fstring%3E%3C%2Fvalue%3E%0A%3C%2Fparam%3E%0A%3C%2Fparams%3E%0A%3C%2FmethodCall%3E&headers=Content%2DType%3A+text%2Fxml&url=xmlrpc%3A%2F%2Flocalhost%2Fvcweb%2FGhostXmlrpc&reqtype=POST&lzt=data&ccache=false&cache=false&sendheaders=false 

Cookie Data: 
JSESSIONID=2FEEB2B9C6B91302795CD62AD3D274A6 

Request Headers: 
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) 
Host: localhost 
Accept-Encoding: gzip, deflate 
Accept-Language: he-IL 
Pragma: no-cache 
Content-Type: application/x-www-form-urlencoded 
UA-CPU: x86 
Accept: */* 
Content-Length: 462 
Connection: keep-alive 
Referer: http://localhost/lps/workspace/VC/client/welcomei.lzx?lzt=swf&lzr=swf8 
x-flash-version: 9,0,115,0 


Gilad Parann-Nissany 



-- 
Henry Minsky 
Software Architect 
hminsky at laszlosystems.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20080325/34e533d1/attachment.html


More information about the Laszlo-user mailing list