Reading from data from socket does not work on MacOS X

Alex Tweedly alex at tweedly.net
Wed Apr 6 20:33:37 EDT 2005


Mark Schonewille wrote:

> Hello,
>
> I am trying to create a server that handles POST actions from web 
> forms. Rather than using cgi, I read the socket and handle the 
> request. If the request contains the data from the web form, it is 
> written to a file. This works fine if the server is running MacOS 9, 
> but not on MacOS X.
>
> The test script is fairly simple:
>
> on foo
>   accept connections on port 8181
>   -- may test for result
> end foo
>
Shouldn't that be
   accept connections on port 8181 with message "connected"

(Though I have no clue why that would work on OS9 and not on OS X  ..... 
I'm hoping you made a  typo in copying)

> on connected theIP thePort
>   read from socket theIP with message "readSocket"
> end connected
>
> on readSocket theIP theMsg
>   put theMsg
> end readSocket
>
> The webform starts with a tag such as:
>
> <form method=POST action="http://192.168.0.1:8181/send.xyz">
>
> There is nothing special about the remainder of the web form. Also, 
> the web form sends data correctly from Mozilla, FireFox, and Netscape. 
> I am quite sure that nothing is wrong with that.
>
> If the server runs on MacOS 8 or MacOS 9, I can submit the webform 
> from within any browser. The data appear correctly in the message box 
> (or in a field in a standalone, with slight adjustments to the 
> script). However, if the server is running on MacOS X, I can see that 
> a connection is made and Rev receives data, but the last line, which 
> should contain the submitted data, is not included. Which might cause 
> this? Did anyone try this before and have you experienced similar 
> problems?
>
> Best regards,
>
> Mark
>


-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.2 - Release Date: 05/04/2005



More information about the use-livecode mailing list