Why do my communicationwith an ASP script from an applet running under Machintosh Internet Explorer fail ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Magnus_Persson
Posted On:   Monday, June 11, 2001 05:10 AM

I am writing an HTML editor applet that is saving its contents via an ASP page. The applet communicates with the ASP page by creating an URLConnection and then writing the content to it. The written stream looks like this: "output=hello world" and its URL encoded. The problem is that the solution works excellent under Windows with MS Internet Explorer 5.0, but NOT on Macintosh with the same browser and browser version for some reason. On Mac, the ASP page is started but fails due to that the applet seems to fail when trying to write the content to it. (The applet hangs till the timeout is reached. Then MS IE tells me that there were 11 communication errors) Another thing i   More>>

I am writing an HTML editor applet that
is saving its contents via an ASP page.

The applet communicates with the ASP page by creating an URLConnection and
then writing the content to it. The written stream looks like this: "output=hello world" and its URL encoded.

The problem is that the solution works excellent under Windows with MS Internet Explorer 5.0, but NOT on Macintosh with the same browser and browser version for some reason.

On Mac, the ASP page is started but
fails due to that the applet seems to fail when trying to write the content to it. (The applet hangs till the timeout is reached. Then MS IE tells me
that there were 11 communication errors)

Another thing is that the connection works on both systems if I call a CGI application written in C++.

Maybe its good to know that the ASP script is catching the input to it by the Request.Form("output") method (ooups.. I know this forum is ment for java, sorry m8s).

Ps. All urls and code are correct and there is no exception thrown.

My question is therefore.. Why and what may produce this problem ?..

Thank you for reading this article !

Best Wishes..
Magnus Persson

   <<Less

Re: Why do my communicationwith an ASP script from an applet running under Machintosh Internet Explorer fail ?

Posted By:   Tim_Rohaly  
Posted On:   Tuesday, June 12, 2001 12:59 PM

Without seeing your code I can only guess, but it
is likely that you are writing your data using
println(), which appends a platform-specific
line terminator. On the Macintosh, this is
, while on
Windows this is
. Your ASP script is probably
trying to read a line terminator and is expecting

, but only seeing
, so it hangs waiting for the

.


This is one example of why you should never
use println() when writing data across the network.


Any real network protocol specifies termination characters
completely. In the case of HTTP, you must use

as a terminator everywhere except the body (the body
is bulk data, perhaps binary, which the HTTP protocol
doesn't control).

About | Sitemap | Contact