Reading from data from socket does not work on MacOS X

Mark Schonewille europe at ehug.info
Wed Apr 6 19:36:20 EDT 2005


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

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

-- 

eHUG coordinator
mailto:europe at ehug.info
fax: +1 501 633 94 04
http://home.wanadoo.nl/mark.sch
http://www.ehug.info



More information about the use-livecode mailing list