Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Angus Robertson - Magenta Systems Ltd
> For a current project I need to build an HTTP server to which data 
> can be POSTed, so I build one using OverbyteIcsWebServ.dpr as an 
> example.
> I ran into stability problems, and starting slimming my code down 
> to isolate the problem.

Please try uploading your file to one of my public servers, which uses the ICS
webapp server component, and see if you get the same problem.

http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Merijn Bosma

Hi Angus,

Thanks for the idea, can I upload files from software instead of using 
the webpage?


Thanks,

Merijn

On 04/09/2014 13:25, Angus Robertson - Magenta Systems Ltd wrote:

For a current project I need to build an HTTP server to which data
can be POSTed, so I build one using OverbyteIcsWebServ.dpr as an
example.
I ran into stability problems, and starting slimming my code down
to isolate the problem.

Please try uploading your file to one of my public servers, which uses the ICS
webapp server component, and see if you get the same problem.

http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm

Angus



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Angus Robertson - Magenta Systems Ltd
> Thanks for the idea, can I upload files from software instead of
> using the webpage?

This is explained when you read the web page.

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Merijn Bosma

Duh, looked at the page but didn't real bottom lines :\ sorry for that.

No, I can't reproduce using that URL, I'm not really sure what triggers 
the situation (see the fact that calling TMemo.Lines.Add() seems to 
avoid the problem).


I'm currently adding debug log into ICS, and it seems that at the moment 
things go wrong, TCustomWSocket.Do_FD_WRITE is called when it should 
not. Also in fault situation wParam is 668 (where normally it's 652). 
Don't know yet why or what it means though.
Cause Do_FD_WRITE is called, some flags are switched in 
OverbyteIcsHttpSrv, which makes that the last block is dropped.


Merijn

On 04/09/2014 13:39, Angus Robertson - Magenta Systems Ltd wrote:

Thanks for the idea, can I upload files from software instead of
using the webpage?

This is explained when you read the web page.

Angus



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Angus Robertson - Magenta Systems Ltd
> No, I can't reproduce using that URL, I'm not really sure what 
> triggers the situation 

I have seen cases where a bug that shows up during testing on a fast LAN is
never reproduced on real world servers and networks.

Try adding bandwidth limiting to your client to slow down the speed on the LAN.
Set BandwidthLimit to bps, and add HttpoBandwidthControl to Options.

This is an alternate to adding extra delays which is effectively what you are
doing by updating the screen. 

There is probably a race condition somewhere, that has yet to be found.

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Angus Robertson - Magenta Systems Ltd
> No, I can't reproduce using that URL

You did not succeed in saving any files on the server, because my application
ignores all upload file names with file path delimiters.  It will be a better
test if you strip off the path and just leave the XML file name.  

12:42:59 Request: 192.168.1.162:80[id=5398] from 80.100.37.247
(bosma.xs4all.nl):
http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm?FileName=merijn.test/cg
i-bin/FileUpload/books.xml POST 
12:42:59 Received Post Data File, Size 4,550, Content Type: application/binary
12:42:59 Illegal Upload File Name: merijn.test/cgi-bin/FileUpload/books.xml
FileName: merijn.test/cgi-bin/FileUpload/books.xml
FileTitle: 
Post URL: http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm
>From IP Address: 80.100.37.247
12:42:59 Request Completed: 192.168.1.162:80[id=5398] 80.100.37.247
(bosma.xs4all.nl), Result 200, took 0ms, CurRead 4.97 Kbytes, CurWrite 2.35
Kbytes

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Merijn Bosma

Hi Angus,

I wasn't aware the /cg was in the filename, it was there unintentionally.
I've tried a number of times with this url 
http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm?FileName=merijn.test

Can you please confirm if the upload went ok?

thanks,

Merijn

On 04/09/2014 16:30, Angus Robertson - Magenta Systems Ltd wrote:

No, I can't reproduce using that URL

You did not succeed in saving any files on the server, because my application
ignores all upload file names with file path delimiters.  It will be a better
test if you strip off the path and just leave the XML file name.

12:42:59 Request: 192.168.1.162:80[id=5398] from 80.100.37.247
(bosma.xs4all.nl):
http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm?FileName=merijn.test/cg
i-bin/FileUpload/books.xml POST
12:42:59 Received Post Data File, Size 4,550, Content Type: application/binary
12:42:59 Illegal Upload File Name: merijn.test/cgi-bin/FileUpload/books.xml
FileName: merijn.test/cgi-bin/FileUpload/books.xml
FileTitle:
Post URL: http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm
>From IP Address: 80.100.37.247
12:42:59 Request Completed: 192.168.1.162:80[id=5398] 80.100.37.247
(bosma.xs4all.nl), Result 200, took 0ms, CurRead 4.97 Kbytes, CurWrite 2.35
Kbytes

Angus



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Merijn Bosma

Hi Angus,

While I agree with you, the issue seems to be a little more complex.

I've tried this connection over the internet, client on a remote 
location, server running locally. It still shows the same issue.
What's ever more odd is that I switched the writing to TMemo.Lines with 
a sleep(), to see how long waiting is required to get things running.
When running locally (both client and server on the same macine), a 
sleep(1) is enough to 'work around' the issue. When running the client
on a remote site, I have to up this to sleep(100) to make things work 
(sleep(50) didn't work ok, didn't try between 50 and 100).


So long story short, the slower the network connection, the longer the 
sleep has to be to get things working, which gives me the feeling it's 
not a normal 'two things happening at nearly the same time' kind of problem.


Merijn

On 04/09/2014 15:04, Angus Robertson - Magenta Systems Ltd wrote:

No, I can't reproduce using that URL, I'm not really sure what
triggers the situation

I have seen cases where a bug that shows up during testing on a fast LAN is
never reproduced on real world servers and networks.

Try adding bandwidth limiting to your client to slow down the speed on the LAN.
Set BandwidthLimit to bps, and add HttpoBandwidthControl to Options.

This is an alternate to adding extra delays which is effectively what you are
doing by updating the screen.

There is probably a race condition somewhere, that has yet to be found.

Angus



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] issues with POSTing data to ICS HTTP server (reproducible with ICS HTTP server demo)

2014-09-04 Thread Angus Robertson - Magenta Systems Ltd
> I've tried a number of times with this url 
> http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm?FileName=me
> rijn.test
> Can you please confirm if the upload went ok?

> Received Post Data File, Size 4,550, Content Type: application/binary
> FileName: merijn.test/cgi-bin/FileUpload/books.xml

No, my application decodes the received POST data with TFormDataAnalyser, and
that has the longer CGI file name.  

It ignores the URL argument if the HTTP content says multipart/form-data.

It's a couple of years since I worked with this stuff and I don't POST files in
any of my active applications, so I'm a little hazy on why it's there -
possibly to test the form decoding components when someone in this mailing list
was having a problem. 

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be